| Linux premium331.web-hosting.com 4.18.0-553.80.1.lve.el8.x86_64 #1 SMP Wed Oct 22 19:29:36 UTC 2025 x86_64 Path : /home/livedhms/lmgt/node_modules/remeda/dist/ |
| Current File : /home/livedhms/lmgt/node_modules/remeda/dist/once.js.map |
{"version":3,"file":"once.js","names":["ret: T"],"sources":["../src/once.ts"],"sourcesContent":["/**\n * Creates a function that is restricted to invoking `func` once. Repeat calls to the function return the value of the first invocation.\n *\n * @param fn - The function to wrap.\n * @signature R.once(fn)\n * @example\n * const initialize = R.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n * @category Function\n */\nexport function once<T>(fn: () => T): () => T {\n let called = false;\n let ret: T;\n return () => {\n if (!called) {\n ret = fn();\n called = true;\n }\n return ret;\n };\n}\n"],"mappings":"AAYA,SAAgB,EAAQ,EAAsB,CAC5C,IAAI,EAAS,GACTA,EACJ,WACE,AAEE,KADA,EAAM,GAAI,CACD,IAEJ"}