CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
unmemoize.js25 linesDownload Raw Back to async
1"use strict";2 3Object.defineProperty(exports, "__esModule", {4    value: true5});6exports.default = unmemoize;7/**8 * Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original,9 * unmemoized form. Handy for testing.10 *11 * @name unmemoize12 * @static13 * @memberOf module:Utils14 * @method15 * @see [async.memoize]{@link module:Utils.memoize}16 * @category Util17 * @param {AsyncFunction} fn - the memoized function18 * @returns {AsyncFunction} a function that calls the original unmemoized function19 */20function unmemoize(fn) {21    return (...args) => {22        return (fn.unmemoized || fn)(...args);23    };24}25module.exports = exports.default;
basant307/AI_Governance_Project · CoolFace