Setting value to undefined removes property
Open
Nobody has claimed this yet.
feature
prs-welcome
- Dominant language
- JavaScript
- Stars
- 197
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
I am setting a value of undefined on an object using your library, and this removes the property completely. I would like to keep the property and really set its property to undefined.
I also put an example here:
const a = {value: 5};
jsonpointer.set(a, 'value', undefined);
console.log(a); // outputs something like {}, but I would like to have {value: undefined}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the JavaScript example from the issue and inspect the library's setter behavior for an undefined value. Done means setting value to undefined leaves the value property present on the object, rather than removing it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100