MCPcopy
hub / github.com/caolan/async / once

Function once

lib/internal/once.js:1–8  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

1export default function once(fn) {
2 return function () {
3 if (fn === null) return;
4 var callFn = fn;
5 fn = null;
6 callFn.apply(this, arguments);
7 };
8}

Callers 8

reduceFunction · 0.85
auto.jsFile · 0.85
eachOfArrayLikeFunction · 0.85
transformFunction · 0.85
mapValuesLimitFunction · 0.85
waterfall.jsFile · 0.85
raceFunction · 0.85
_eachOfLimitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…