Path syntax: Negative array index
Closed this issue · 6 comments
nlepage commented
Description
Slice notation already allows negative indexes.
Allow it in simple array notation as well.
Example
const arr = [1, 2, 3, 4]
add(arr, '[-1]', 1) // => [1, 2, 3, 5]
add(arr, '[-2]', 1) // => [1, 2, 4, 4]
nlepage commented
To be reimplemented in new apply ?
nlepage commented
closed by accident while merging dev branch into master...
nlepage commented
You may start 😉
nlepage commented
It appears I had already done it when writing the navigators...