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

Function tryCast

test/fixtures/snapshot/typescript.js:1840–1842  ·  view source on GitHub ↗
(value, test)

Source from the content-addressed store, hash-verified

1838 }
1839 ts.isNumber = isNumber;
1840 function tryCast(value, test) {
1841 return value !== undefined && test(value) ? value : undefined;
1842 }
1843 ts.tryCast = tryCast;
1844 function cast(value, test) {
1845 if (value !== undefined && test(value))

Callers

nothing calls this directly

Calls 1

testFunction · 0.70

Tested by

no test coverage detected