MCPcopy Index your code
hub / github.com/keepfool/vue-tutorials / indexOf

Function indexOf

06.Router/basic/js/vue.js:353–359  ·  view source on GitHub ↗

* Manual indexOf because it's slightly faster than * native. * * @param {Array} arr * @param {*} obj

(arr, obj)

Source from the content-addressed store, hash-verified

351 */
352
353 function indexOf(arr, obj) {
354 var i = arr.length;
355 while (i--) {
356 if (arr[i] === obj) return i;
357 }
358 return -1;
359 }
360
361 /**
362 * Make a cancellable version of an async callback.

Callers 1

vue.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected