Release - Latest | Release - Pre | |
---|---|---|
() | () | |
A NodeJS module to return unique array elements without any duplicated elements by ignore their reference points.
- Target Version: >= v16.13.0, &:
- TypeScript >= v5.1.0 [Development]
- Require Permission: N/A
- Registry:
- NPM
npm install @hugoalh/unique-array[@<Tag>]
import ... from "@hugoalh/unique-array";
- NPM
ℹ️ Notice: It is also able to import part of the module with sub path if available, see file
package.json
propertyexports
for available sub paths.
-
function uniqueArray<T>(item: T[]): T[];
ℹ️ Notice: Documentation is included inside the script file.
-
import { uniqueArray } from "@hugoalh/unique-array"; uniqueArray([{ foo: "bar" }, { foo: "bar" }, { bar: "gaz" }]); //=> [{ foo: "bar" }, { bar: "gaz" }]