hugoalh-studio / unique-array-js

[MIGRATED TO https://github.com/hugoalh-studio/unique-array-es] A JavaScript module to return unique array elements without any duplicated elements by ignore their reference points.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unique Array (NodeJS)

⚖️ MIT

Release - Latest Release - Pre
GitHub GitHub Latest Release Version (GitHub Latest Release Date) GitHub Latest Pre-Release Version (GitHub Latest Pre-Release Date)
NPM NPM Latest Release Version NPM Latest Pre-Release Version

A NodeJS module to return unique array elements without any duplicated elements by ignore their reference points.

🔰 Begin

NodeJS

  • 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";

ℹ️ Notice: It is also able to import part of the module with sub path if available, see file package.json property exports for available sub paths.

🧩 API

  • function uniqueArray<T>(item: T[]): T[];

ℹ️ Notice: Documentation is included inside the script file.

✍️ Example

  • import { uniqueArray } from "@hugoalh/unique-array";
    
    uniqueArray([{ foo: "bar" }, { foo: "bar" }, { bar: "gaz" }]);
    //=> [{ foo: "bar" }, { bar: "gaz" }]

🔗 Other Edition

About

[MIGRATED TO https://github.com/hugoalh-studio/unique-array-es] A JavaScript module to return unique array elements without any duplicated elements by ignore their reference points.

License:Other


Languages

Language:TypeScript 100.0%