MCPcopy Index your code
hub / github.com/nodejs/node / first

Function first

test/fixtures/snapshot/typescript.js:1315–1318  ·  view source on GitHub ↗
(array)

Source from the content-addressed store, hash-verified

1313 }
1314 ts.firstOrUndefined = firstOrUndefined;
1315 function first(array) {
1316 ts.Debug.assert(array.length !== 0);
1317 return array[0];
1318 }
1319 ts.first = first;
1320 /**
1321 * Returns the last element of an array if non-empty, `undefined` otherwise.

Callers

nothing calls this directly

Calls 1

assertMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…