LittleDemon WebShell


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 : /proc/self/root/home/livedhms/lmgt/node_modules/remeda/dist/
File Upload :
Command :
Current File : //proc/self/root/home/livedhms/lmgt/node_modules/remeda/dist/tap.js.map

{"version":3,"file":"tap.js","names":[],"sources":["../src/tap.ts"],"sourcesContent":["import { purry } from \"./purry\";\n\n/**\n * Calls the given function with the given value, then returns the given value.\n * The return value of the provided function is ignored.\n *\n * This allows \"tapping into\" a function sequence in a pipe, to perform side\n * effects on intermediate results.\n *\n * @param value - The value to pass into the function.\n * @param fn - The function to call.\n * @signature\n *    R.tap(value, fn)\n * @example\n *    R.tap(\"foo\", console.log) // => \"foo\"\n * @dataFirst\n * @category Other\n */\nexport function tap<T>(value: T, fn: (value: T) => void): T;\n\n/**\n * Calls the given function with the given value, then returns the given value.\n * The return value of the provided function is ignored.\n *\n * This allows \"tapping into\" a function sequence in a pipe, to perform side\n * effects on intermediate results.\n *\n * @param fn - The function to call.\n * @signature\n *    R.tap(fn)(value)\n * @example\n *    R.pipe(\n *      [-5, -1, 2, 3],\n *      R.filter(n => n > 0),\n *      R.tap(console.log), // prints [2, 3]\n *      R.map(n => n * 2)\n *    ) // => [4, 6]\n * @dataLast\n * @category Other\n */\nexport function tap<\n  T,\n  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters -- TODO: This is solvable by inlining F and wrapping the T parameter with `NoInfer` (e.g. `(value: NoInfer<T>) => unknown`); to prevent typescript from inferring it as `unknown`. This is only available in TS 5.4, which is above what we currently support (5.1).\n  F extends (value: T) => unknown,\n>(fn: F): (value: T) => T;\n\nexport function tap(...args: readonly unknown[]): unknown {\n  return purry(tapImplementation, args);\n}\n\nfunction tapImplementation<T>(value: T, fn: (value: T) => void): T {\n  fn(value);\n  return value;\n}\n"],"mappings":"wCA8CA,SAAgB,EAAI,GAAG,EAAmC,CACxD,OAAO,EAAM,EAAmB,EAAK,CAGvC,SAAS,EAAqB,EAAU,EAA2B,CAEjE,OADA,EAAG,EAAM,CACF"}

LittleDemon - FACEBOOK
[ KELUAR ]