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

{"version":3,"file":"uniqueWith.js","names":[],"sources":["../src/uniqueWith.ts"],"sourcesContent":["import { purryFromLazy } from \"./internal/purryFromLazy\";\nimport type { Deduped } from \"./internal/types/Deduped\";\nimport type { IterableContainer } from \"./internal/types/IterableContainer\";\nimport type { LazyEvaluator } from \"./internal/types/LazyEvaluator\";\nimport { SKIP_ITEM } from \"./internal/utilityEvaluators\";\n\ntype IsEquals<T> = (a: T, b: T) => boolean;\n\n/**\n * Returns a new array containing only one copy of each element in the original\n * list. Elements are compared by custom comparator isEquals.\n *\n * @param data - The array to filter.\n * @param isEquals - The comparator.\n * @signature\n *    R.uniqueWith(array, isEquals)\n * @example\n *    R.uniqueWith(\n *      [{a: 1}, {a: 2}, {a: 2}, {a: 5}, {a: 1}, {a: 6}, {a: 7}],\n *      R.equals,\n *    ) // => [{a: 1}, {a: 2}, {a: 5}, {a: 6}, {a: 7}]\n * @dataFirst\n * @lazy\n * @category Array\n */\nexport function uniqueWith<T extends IterableContainer>(\n  data: T,\n  isEquals: IsEquals<T[number]>,\n): Deduped<T>;\n\n/**\n * Returns a new array containing only one copy of each element in the original\n * list. Elements are compared by custom comparator isEquals.\n *\n * @param isEquals - The comparator.\n * @signature R.uniqueWith(isEquals)(array)\n * @example\n *    R.uniqueWith(R.equals)(\n *      [{a: 1}, {a: 2}, {a: 2}, {a: 5}, {a: 1}, {a: 6}, {a: 7}],\n *    ) // => [{a: 1}, {a: 2}, {a: 5}, {a: 6}, {a: 7}]\n *    R.pipe(\n *      [{a: 1}, {a: 2}, {a: 2}, {a: 5}, {a: 1}, {a: 6}, {a: 7}], // only 4 iterations\n *      R.uniqueWith(R.equals),\n *      R.take(3)\n *    ) // => [{a: 1}, {a: 2}, {a: 5}]\n * @dataLast\n * @lazy\n * @category Array\n */\nexport function uniqueWith<T extends IterableContainer>(\n  isEquals: IsEquals<T[number]>,\n): (data: T) => Deduped<T>;\n\nexport function uniqueWith(...args: readonly unknown[]): unknown {\n  return purryFromLazy(lazyImplementation, args);\n}\n\nconst lazyImplementation =\n  <T>(isEquals: IsEquals<T>): LazyEvaluator<T> =>\n  (value, index, data) => {\n    const firstEqualIndex = data.findIndex(\n      (otherValue, otherIndex) =>\n        index === otherIndex || isEquals(value, otherValue),\n    );\n\n    // skip items that aren't at the first equal index.\n    return firstEqualIndex === index\n      ? { done: false, hasNext: true, next: value }\n      : SKIP_ITEM;\n  };\n"],"mappings":"+FAqDA,SAAgB,EAAW,GAAG,EAAmC,CAC/D,OAAO,EAAc,EAAoB,EAAK,CAGhD,MAAM,EACA,IACH,EAAO,EAAO,IACW,EAAK,WAC1B,EAAY,IACX,IAAU,GAAc,EAAS,EAAO,EAAW,CACtD,GAG0B,EACvB,CAAE,KAAM,GAAO,QAAS,GAAM,KAAM,EAAO,CAC3C"}

LittleDemon - FACEBOOK
[ KELUAR ]