`dset` creates array instead of object for nested empty string property
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 783
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
This test currently fails:
```js
objects(`should ${verb} empty string property`, () => {
let { input } = prepare({});
dset(input, ["hello", ""], 123);
assert.equal(input, {
hello: { "": 123 },
});
});
```
with
```
FAIL objects "should merge empty string property"
Expected values to be deeply equal: (equal)
··{
Actual:
--··"hello":·[]
Expected:
++··"hello":·{
++····"":·123
++··}
··}
```
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
Start by running the failing objects test shown in the issue and inspect the dset implementation it exercises. The work is done when setting the path ["hello", ""] produces an object containing the empty-string property with value 123, and the test passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100