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

Function memoize

test/fixtures/snapshot/typescript.js:1923–1932  ·  view source on GitHub ↗
(callback)

Source from the content-addressed store, hash-verified

1921 }
1922 ts.notImplemented = notImplemented;
1923 function memoize(callback) {
1924 var value;
1925 return function () {
1926 if (callback) {
1927 value = callback();
1928 callback = undefined;
1929 }
1930 return value;
1931 };
1932 }
1933 ts.memoize = memoize;
1934 /** A version of `memoize` that supports a single primitive argument */
1935 function memoizeOne(callback) {

Callers

nothing calls this directly

Calls 1

callbackFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…