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

Compose #20

Merged
merged 2 commits into from
Sep 29, 2015
Merged

Compose #20

merged 2 commits into from
Sep 29, 2015

Conversation

marcbachmann
Copy link
Collaborator

var jsonpointer = require('jsonpointer')
var ref = jsonpointer.compile('/a')
ref.get(object) // returns object['a']
ref.set(object, value) // sets object['a'] = value

Discussed in #8

if(!obj.hasOwnProperty(part)) {
return null;

if (!obj.hasOwnProperty(part) && !value) return null;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe I should check value against undefined instead of a falsy value.

@marcbachmann
Copy link
Collaborator Author

@hildjj still interested in this feature?

marcbachmann added a commit that referenced this pull request Sep 29, 2015
jsonpointer.compile(pointer) feature
@marcbachmann marcbachmann merged commit dc1e2c6 into janl:master Sep 29, 2015
@marcbachmann marcbachmann deleted the compose branch September 29, 2015 23:09
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.

1 participant