MCPcopy Create free account
hub / github.com/ampproject/amphtml / getIndex

Function getIndex

third_party/resize-observer-polyfill/ResizeObserver.js:25–35  ·  view source on GitHub ↗

* Returns index in provided array that matches the specified key. * * @param {Array } arr * @param {*} key * @returns {number}

(arr, key)

Source from the content-addressed store, hash-verified

23 * @returns {number}
24 */
25 function getIndex(arr, key) {
26 var result = -1;
27 arr.some(function (entry, index) {
28 if (entry[0] === key) {
29 result = index;
30 return true;
31 }
32 return false;
33 });
34 return result;
35 }
36 return /** @class */ (function () {
37 function class_1() {
38 this.__entries__ = [];

Callers 1

ResizeObserver.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected