jonschlinkert / set-value

Set nested properties on an object using dot-notation.
https://github.com/jonschlinkert
MIT License
271 stars 41 forks source link

refactor #28

Closed jonschlinkert closed 3 years ago

jonschlinkert commented 3 years ago

Refactored to accomplish the following:

@doowb please review when you get a chance. I'll add details about those points before we release. thanks!

doowb commented 3 years ago

Question: Is parse being used for anything? I see it exported on setValue, but I don't see where it's being used.

Looks like this will require Node.js >=12 since .flatMap is not available in Node.js 10. Other than that, looks good to me!

jonschlinkert commented 3 years ago

Is parse being used for anything? I see it exported on setValue, but I don't see where it's being used.

It's not directly, but might be exposed on the API to use as a custom options.split function.

Looks like this will require Node.js >=12 since .flatMap is not available in Node.js 10.

Good catch. Instead, it makes more sense to not use .flatMap().