LetsMelon / LetsMelon/addIdToArray
Generated id < 0
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. parameter.incrementStep = -5
addIdToArray(
[
{ name: 'Jeff', age: 19 },
{ name: 'Maria', age: 20 },
],
{ headers: 'person', incrementStep: -5 }
);
/* --> [
* { id: 1, person: { name: 'Jeff', age: 19 } },
* { id: -4, person: { name: 'Maria', age: 20 } }
* ]
*/
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
The entry point shown is addIdToArray; inspect how incrementStep is applied when it is negative and check whether existing tests cover this case. Clarify the intended behavior for a negative step, then add a regression test and confirm the resulting IDs match the agreed expectation.
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
- Needs clarification
- Newbie friendliness
- 30/100