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

Function findAfter

build-system/eslint-rules/prefer-unnested-spread-objects.js:43–46  ·  view source on GitHub ↗

* @param {Array } array * @param {T} item * @return {?T}

(array, item)

Source from the content-addressed store, hash-verified

41 * @return {?T}
42 */
43 function findAfter(array, item) {
44 const index = array.indexOf(item);
45 return index < array.length - 1 ? array[index + 1] : null;
46 }
47
48 return {
49 [`${spreadElement} > ObjectExpression`](node) {

Callers 1

fixFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected