MCPcopy Create free account
hub / github.com/docker/getting-started / findIndex

Function findIndex

app/src/static/js/react-bootstrap.js:3829–3842  ·  view source on GitHub ↗

* Return the index of the matching object * @method * @memberof Popper.Utils * @argument {Array} arr * @argument prop * @argument value * @returns index or -1

(arr, prop, value)

Source from the content-addressed store, hash-verified

3827
3828
3829function findIndex(arr, prop, value) {
3830 // use native findIndex if supported
3831 if (Array.prototype.findIndex) {
3832 return arr.findIndex(function (cur) {
3833 return cur[prop] === value;
3834 });
3835 } // use `find` + `indexOf` if `findIndex` isn't supported
3836
3837
3838 var match = find(arr, function (obj) {
3839 return obj[prop] === value;
3840 });
3841 return arr.indexOf(match);
3842}
3843/**
3844 * Loop trough the list of modifiers and run them in order,
3845 * each of them will then edit the data object.

Callers 1

runModifiersFunction · 0.85

Calls 1

findFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…