Sha256: 5f5ce7573029cf02cf63d2bc2cecc40b75e99bca55536bef32b472a3d6ffe206
Contents?: true
Size: 478 Bytes
Versions: 44
Compression:
Stored size: 478 Bytes
Contents
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /** * This replicates lodash's once functionality for our purposes. */ module.exports = function(func) { let called = false; let result; return function(...args) { if (called) { return result; } called = true; return result = func.apply(this, args); }; };
Version data entries
44 entries across 15 versions & 1 rubygems