From e409bd1c6809ea092474358a15b49087709b0abe Mon Sep 17 00:00:00 2001 From: Pierre-Nicolas Watin-Augouard Date: Tue, 24 Sep 2024 16:19:13 +0200 Subject: [PATCH] chore: remove unDuplicate --- src/arrays/index.ts | 1 - src/arrays/un-duplicate.ts | 11 ----------- src/index.ts | 1 - 3 files changed, 13 deletions(-) delete mode 100644 src/arrays/un-duplicate.ts diff --git a/src/arrays/index.ts b/src/arrays/index.ts index e32ccc1..ac1c1b7 100644 --- a/src/arrays/index.ts +++ b/src/arrays/index.ts @@ -14,7 +14,6 @@ export { shuffle } from './shuffle'; export { sortNumbers } from './sort-numbers'; export { tail } from './tail'; export { toFilled } from './to-filled'; -export { unDuplicate } from './un-duplicate'; export { union } from './union'; export { uniq } from './uniq'; export { xor } from './xor'; diff --git a/src/arrays/un-duplicate.ts b/src/arrays/un-duplicate.ts deleted file mode 100644 index ab96d35..0000000 --- a/src/arrays/un-duplicate.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Remove duplicate items from an array. - * @template T - * @param {T[]} array - The array to remove duplicates from. - * @returns {T[]} A new array with duplicate items removed. - * @example - * const array = [1, 2, 3, 3]; - * const result = unDuplicate(array); - * // result will be [1, 2, 3] - */ -export const unDuplicate = (array: T[]): T[] => [...new Set(array)]; diff --git a/src/index.ts b/src/index.ts index 363b1f1..72c0f5f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -17,7 +17,6 @@ export { sortNumbers, tail, toFilled, - unDuplicate, union, uniq, xor,