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/map.js.map

{"version":3,"file":"map.js","names":[],"sources":["../src/map.ts"],"sourcesContent":["import type { IterableContainer } from \"./internal/types/IterableContainer\";\nimport type { LazyEvaluator } from \"./internal/types/LazyEvaluator\";\nimport type { Mapped } from \"./internal/types/Mapped\";\nimport { purry } from \"./purry\";\n\n/**\n * Creates a new array populated with the results of calling a provided function\n * on every element in the calling array. Equivalent to `Array.prototype.map`.\n *\n * @param data - The array to map.\n * @param callbackfn - A function to execute for each element in the array. Its\n * return value is added as a single element in the new array.\n * @returns A new array with each element being the result of the callback\n * function.\n * @signature\n *    R.map(data, callbackfn)\n * @example\n *    R.map([1, 2, 3], R.multiply(2)); // => [2, 4, 6]\n *    R.map([0, 0], R.add(1)); // => [1, 1]\n *    R.map([0, 0], (value, index) => value + index); // => [0, 1]\n * @dataFirst\n * @lazy\n * @category Array\n */\nexport function map<T extends IterableContainer, U>(\n  data: T,\n  callbackfn: (value: T[number], index: number, data: T) => U,\n): Mapped<T, U>;\n\n/**\n * Creates a new array populated with the results of calling a provided function\n * on every element in the calling array. Equivalent to `Array.prototype.map`.\n *\n * @param callbackfn - A function to execute for each element in the array. Its\n * return value is added as a single element in the new array.\n * @returns A new array with each element being the result of the callback\n * function.\n * @signature\n *    R.map(callbackfn)(data)\n * @example\n *    R.pipe([1, 2, 3], R.map(R.multiply(2))); // => [2, 4, 6]\n *    R.pipe([0, 0], R.map(R.add(1))); // => [1, 1]\n *    R.pipe([0, 0], R.map((value, index) => value + index)); // => [0, 1]\n * @dataLast\n * @lazy\n * @category Array\n */\nexport function map<T extends IterableContainer, U>(\n  callbackfn: (value: T[number], index: number, data: T) => U,\n): (data: T) => Mapped<T, U>;\n\nexport function map(...args: readonly unknown[]): unknown {\n  return purry(mapImplementation, args, lazyImplementation);\n}\n\nconst mapImplementation = <T, U>(\n  data: readonly T[],\n  callbackfn: (value: T, index: number, data: readonly T[]) => U,\n): U[] => data.map(callbackfn);\n\nconst lazyImplementation =\n  <T, U>(\n    callbackfn: (value: T, index: number, data: readonly T[]) => U,\n  ): LazyEvaluator<T, U> =>\n  (value, index, data) => ({\n    done: false,\n    hasNext: true,\n    next: callbackfn(value, index, data),\n  });\n"],"mappings":"wCAmDA,SAAgB,EAAI,GAAG,EAAmC,CACxD,OAAO,EAAM,EAAmB,EAAM,EAAmB,CAG3D,MAAM,GACJ,EACA,IACQ,EAAK,IAAI,EAAW,CAExB,EAEF,IAED,EAAO,EAAO,KAAU,CACvB,KAAM,GACN,QAAS,GACT,KAAM,EAAW,EAAO,EAAO,EAAK,CACrC"}

LittleDemon - FACEBOOK
[ KELUAR ]