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 support for array creation #22

Merged
merged 1 commit into from
Apr 28, 2021
Merged

Conversation

zeidoo
Copy link
Contributor

@zeidoo zeidoo commented Jun 3, 2020

The current implementation always creates objects.

Added support for array creation for paths like a.0.

Example: set({}, 'a.0', 42)
Previous implementation would make "a" an Object with a property named "0" set to the number 42.
New implementation makes "a" and Array with the first element set to the number 42.

Should fix: #19

@gonenoob
Copy link

Negative numbers need to be considered

@jonschlinkert
Copy link
Owner

Hi @zeidoo thanks for the PR and sorry for the late response. I refactored this library and will be doing a major release shortly, but I'm going to merge this anyway to acknowledge the time and effort you took to contribute. Thank you.

@jonschlinkert jonschlinkert merged commit db9602f into jonschlinkert:master Apr 28, 2021
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.

add options to support array
3 participants