-
-
Notifications
You must be signed in to change notification settings - Fork 617
Add SplitOnRestElement
, ExtractRestElement
, ExcludeRestElement
types
#1166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ludeSpread` and `ExtractSpread` into seperated files with tests
Please run everything through AI to find typos, bugs, mistakes, and if there are any missing tests. |
Co-authored-by: Sindre Sorhus <[email protected]>
@som-sm can u review this ! |
@som-sm Ping... :) |
Please run everything through AI. Same with your other pull requests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benzaria Please take the time to thoroughly check your PRs before requesting a review.
You've marked issues as resolved without actually addressing them. There's no rush, just make sure to fix the obvious issues before involving others.
That’s fine, please take your time. Just make sure to double-check your work before requesting a review. |
@som-sm I run it thru AI sanitizing any typos and bad grammar. |
I'll try to give it a proper read tomorrow. BTW, these types should probably be suffixed with I'd also suggest suffixing them with |
Sure ! |
SplitOnSpread
, ExtractSpread
, ExcludeSpread
typesSplitOnRestElement
, ExtractRestElement
, ExcludeRestElement
types
…plitOnRestElement` docs & brought back `Rest[]`
@som-sm I think I resolved all ur comments. |
@som-sm @sindresorhus can u guys take a look i need to continue on |
…ment` to preserve `readonly`
@som-sm Ready ! |
SplitOnRestElemnt
- Splits an Array on its Rest element portion into three parts:[[...Head], Rest[], [...Tail]]
.ExtractRestElemnt
- Returns the rest element type from and array.ExcludeRestElemnt
- Create a array with the rest element removed.Creadit to @som-sm for introducing
CollapseRestElement
I modified a version of it to fit my needs, due toVariablePartOfArray
not working as wanted for Optional elements.