MCPcopy Index your code
hub / github.com/ampproject/amphtml / getArrayValueFunction

Function getArrayValueFunction

test/e2e/test-expect.js:1589–1596  ·  view source on GitHub ↗

* Returns a method that resolves each of its given arguments * @return {function():!Promise } * @template T

(...args)

Source from the content-addressed store, hash-verified

1587 * @template T
1588 */
1589function getArrayValueFunction(...args) {
1590 let i = 0;
1591 const lastIndex = args.length - 1;
1592 return function () {
1593 const index = i++;
1594 return args[index > lastIndex ? lastIndex : index];
1595 };
1596}
1597
1598/**
1599 * Simulate the WebDriver polling functionality to get the latest value

Callers 1

test-expect.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected