Add init function
ebriand opened this issue · comments
Eric Briand commented
Prerequisites
- I have read the Contributing guidelines
- I have read the Code of conduct and I agree with it
Description
To be able to init an object with a value in a path, we have to use
set({}, 'path.to.value', 'value')
If there was an init function, the syntax will be
init('path.to.value', 'value')
Expected behavior
The following call
init('path.to.value', 'value')
should return
{ "path": { "to": { "value": "value" } } }
(equivalent to set({}, 'path.to.value', 'value'))
Nicolas Lepage commented
closed by #288