Negative array index support `array[-1]` using ES2015 Proxy
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
Negative array index supportarray[-1]using ES2015Proxy
$ npm install negative-array
const negativeArray = require('negative-array');
// Adds negative array index support to any given array const unicorn = negativeArray(['🐴', '🎂', '🌈']);
// Get the last item by using a negative index console.log(unicorn[-1]); //=> '🌈'
// OMG, YES!
MIT © Sindre Sorhus