LetsMelon / LetsMelon/addIdToArray
Empty Object and/or Array
Open
Nobody has claimed this yet.
bug
help wanted
invalid
- Dominant language
- JavaScript
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Question
Should this behaviour (see examples) be fixed?
Examples
1. addIdToArray([])
addIdToArray([]);
// --> []
2. addIdToArray([{}, {}])
addIdToArray([{}, {}]);
// --> [ { id: 1 }, { id: 2 } ]
3. addIdToArray([[], []])
addIdToArray([[], []]);
// --> [ { id: 1 }, { id: 2 } ]
4. addIdToArray(undefined)
addIdToArray(undefined);
// --> [ { id: 1 } ]
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 at the addIdToArray entry point and reproduce the four examples in the issue. No source file or test is identified, and the intended behavior is undecided, so confirm the expected handling of empty objects, arrays, and undefined before making a change; done means the chosen behavior is documented by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100