dockerized_openAger/nodered/rootfs/data/node_modules/indexof/index.js

10 lines
199 B
JavaScript
Raw Permalink Normal View History

2020-10-17 16:42:50 +00:00
var indexOf = [].indexOf;
module.exports = function(arr, obj){
if (indexOf) return arr.indexOf(obj);
for (var i = 0; i < arr.length; ++i) {
if (arr[i] === obj) return i;
}
return -1;
};