-
Notifications
You must be signed in to change notification settings - Fork 15
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
consider returning the target object from set #6
Comments
@lucasfcosta think we should add this? Seems reasonable. |
@keithamus seems reasonable to me too. Looks like a good idea. |
keithamus
added a commit
that referenced
this issue
Oct 11, 2016
feat: setPathValue returns the object in which the value was set. Closes #6
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I migrated from a similar module called lodash-deep. It had the nice feature that the
set
function would return the target object, so you could make a new object from a literal and assign it like this:var req = pathval.set({}, 'session.token.modelId', new ObjectID());
In pathval,
req
ends up undefined here.The text was updated successfully, but these errors were encountered: