Skip to content
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

Add _.insert to array.builders #240

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

jgonggrijp
Copy link
Contributor

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:

  • Updated the test code to present infrastructure.
  • Relaxed the restriction that the first argument must be an array. The implementation is based on Array.prototype.splice, which works on any array-like object; I have adapted the type check accordingly.
  • Added documentation.

@carpben @mafiosso @sktguha @yashshah1 a review by one of you would be welcome.

@@ -208,8 +222,8 @@ _.keepIndexed([1,2,3], function(k) {
If you return either `null` or `undefined` then the result is dropped from the resulting array:

```javascript
_.keepIndexed(['a','b','c'], function(k, v) {
if (k === 1) return v;
_.keepIndexed(['a','b','c'], function(k, v) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants