length-1
1.0.1 • Public • Published length-1
First negative index through Array
var getLengthMinus1 = require('./length-1');
var arr = [1, 2, 3];
arr[-1];
Object.defineProperty(
NodeList.prototype,
-1,
{get: getLengthMinus1}
);
document.querySelectorAll('#menu li')[-1];
Package Sidebar
Install
Weekly Downloads