UNPKG

remeda

Version:

A utility library for JavaScript and Typescript.

17 lines 517 B
//#region src/once.d.ts /** * Creates a function that is restricted to invoking `func` once. Repeat calls to the function return the value of the first invocation. * * @param fn - The function to wrap. * @signature R.once(fn) * @example * const initialize = R.once(createApplication); * initialize(); * initialize(); * // => `createApplication` is invoked once * @category Function */ declare function once<T>(fn: () => T): () => T; //#endregion export { once }; //# sourceMappingURL=once-fzeW4fJL.d.ts.map