Decide how to deal object keying into an array
Open
- Dominant language
- TypeScript
- Stars
- 107
- Forks
- 2
- Avg merge
- 16h 31m
- Merged PRs (30d)
- 1
Description
Currently, this is true:
```ts
const result = parse('arr[prop]=1', {
nesting: true,
nestingSyntax: 'js'
});
// result
({
arr: []
});
// however, we keyed into the array and made things _weird_
result.arr.prop; // 1!
```
the choice to be made here is one of these two, i think:
1. leave it as is, someone is using the syntax incorrectly (true, they should be using `arr.prop=1` for an obj, and `arr[0]` for an array)
2. bail when we encounter prop keys of arrays (so `arr` would be a regular `[]` with no funky properties)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.