indexof-shim

Shims the indexOf method

indexof-shim

Shims the indexOf method. Bonus: it works on NodeLists.

npm install indexof-shim
var indexOf = require('indexof-shim');
 
var arr = [1, 2, 3];
 
console.log(indexOf(arr, 2)); // 1 
console.log(indexOf(arr, 4)); // -1 

MIT License.