Add _.insert to array.builders#240
Open
jgonggrijp wants to merge 8 commits intodocumentcloud:masterfrom
Open
Conversation
Throw TypeError if insert receives something other than an array
sktguha
reviewed
Dec 30, 2020
| ```javascript | ||
| _.keepIndexed(['a','b','c'], function(k, v) { | ||
| if (k === 1) return v; | ||
| _.keepIndexed(['a','b','c'], function(k, v) { |
There was a problem hiding this comment.
Hi @jgonggrijp sorry, I didn't see the PR very deeply, but these look like to me only whitespace specific changes and also the one at line 294 below, is it done due to some eslint formatting work or if not deliberate,then maybe better to remove them as it might cause confusion.
Contributor
Author
There was a problem hiding this comment.
You are right about that. I put them on separate commits, though. So you can review the commits one by one in order to skip most of the whitespace changes (click "Prev"/"Next" in the top right to move between the commits).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the continuation of #199, which will be merged together with the current PR. @acarrau will get the credit for his past work.
I have added the following changes:
Array.prototype.splice, which works on any array-like object; I have adapted the type check accordingly.@carpben @mafiosso @sktguha @yashshah1 a review by one of you would be welcome.