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

Handle negative and decimal paths for setIn. #4

Merged
merged 1 commit into from
Dec 8, 2016

Conversation

YellowKirby
Copy link
Contributor

All numeric values will create an array if needed. Keys that are not positive integers are added as properties to that array. Some related discussion in #3.

Now all numeric values will create an array if needed. Keys that are not
positive integers are added as properties to that array.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 6af218b on YellowKirby:even-more-array-creation into d33d2df on guigrpa:master.

// ... unknown paths create intermediate keys:
setIn({ a: 3 }, ['unknown', 'path'], 4)
// { a: 3, unknown: { path: 4 } }
// ... unknown paths create intermediate keys. Numeric segments are treated as array indices:
Copy link
Owner

@guigrpa guigrpa Dec 8, 2016

Choose a reason for hiding this comment

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

The README is generated automatically based on comments with // -- in src/timm.js. Please update those as well

@guigrpa
Copy link
Owner

guigrpa commented Dec 8, 2016

LGTM, except for the docs. I'll do that myself, don't worry.

Thanks!

@guigrpa guigrpa merged commit 639edc2 into guigrpa:master Dec 8, 2016
@YellowKirby YellowKirby deleted the even-more-array-creation branch December 8, 2016 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants