1.0.1 • Published 7 years ago
negative-indices v1.0.1
negative-indices
Wraps provided array in a Proxy, giving it the power of "Python-style" negative index access.
const myArr = require('negative-indices')([1,2,3])
console.log(myArr[-1]) // 3
Wraps provided array in a Proxy, giving it the power of "Python-style" negative index access.
const myArr = require('negative-indices')([1,2,3])
console.log(myArr[-1]) // 3