callOnce
The function to process.
Function wrapper that ensures the passed function is called only once. Subsequent calls will just return the cached computed result (if any) of the first call of that function.
const init = callOnce(function () { ... });const out = init(); Copy
const init = callOnce(function () { ... });const out = init();
callOnce