MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / getIndexOf

Function getIndexOf

lib/web/jshint.js:5463–5467  ·  view source on GitHub ↗

* Gets the appropriate "indexOf" function. If the `_.indexOf` method is * customized this function returns the custom method, otherwise it returns * the `baseIndexOf` function. If arguments are provided the chosen function * is invoked with them and its result is returned. *

(collection, target, fromIndex)

Source from the content-addressed store, hash-verified

5461 * @returns {Function|number} Returns the chosen function or its result.
5462 */
5463 function getIndexOf(collection, target, fromIndex) {
5464 var result = lodash.indexOf || indexOf;
5465 result = result === indexOf ? baseIndexOf : result;
5466 return collection ? result(collection, target, fromIndex) : result;
5467 }
5468
5469 /**
5470 * Gets the "length" property value of `object`.

Callers 6

baseDifferenceFunction · 0.85
baseUniqFunction · 0.85
intersectionFunction · 0.85
pullFunction · 0.85
uniqFunction · 0.85
includesFunction · 0.85

Calls 1

resultFunction · 0.70

Tested by

no test coverage detected