|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
665 bytes
|
| Line | |
|---|
| 1 | "use strict";
|
|---|
| 2 |
|
|---|
| 3 | Object.defineProperty(exports, "__esModule", {
|
|---|
| 4 | value: true
|
|---|
| 5 | });
|
|---|
| 6 | exports.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 unmemoize
|
|---|
| 12 | * @static
|
|---|
| 13 | * @memberOf module:Utils
|
|---|
| 14 | * @method
|
|---|
| 15 | * @see [async.memoize]{@link module:Utils.memoize}
|
|---|
| 16 | * @category Util
|
|---|
| 17 | * @param {AsyncFunction} fn - the memoized function
|
|---|
| 18 | * @returns {AsyncFunction} a function that calls the original unmemoized function
|
|---|
| 19 | */
|
|---|
| 20 | function unmemoize(fn) {
|
|---|
| 21 | return (...args) => {
|
|---|
| 22 | return (fn.unmemoized || fn)(...args);
|
|---|
| 23 | };
|
|---|
| 24 | }
|
|---|
| 25 | module.exports = exports.default; |
|---|
Note:
See
TracBrowser
for help on using the repository browser.