immutable-js / immutable-js/immutable-js
Supporting wildcards
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 33k
- Forks
- 1.9k
- Avg merge
- 6d 7h
- Merged PRs (30d)
- 1
Description
Supporting wildcards
It would be useful to be able to pass wildcards (*) in path for setIn removeIn, updateIn methods. A wildcard should match all elements in an array or all props in an object.
Example
{
a: {
b: 1,
c: [
{x: 1, y: 2}
]
},
b: {
b: 1,
c: [
{x: 1, y: 2}
]
}
}
deleteIn(x, ['*', 'c', 'x'])
Out
{
a: {
b: 1,
c: [
{y: 2}
]
},
b: {
b: 1,
c: [
{y: 2}
]
}
}
Contributor guide
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 locating the setIn, removeIn, and updateIn implementations and their existing tests. Define and test wildcard behavior for arrays and object properties, including the supplied nested example, and ensure the three methods handle the resulting paths consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100