v1.0.10
An ES (JavaScript & TypeScript) module to return unique array elements without any duplicated elements by ignore their reference points.
Attributes
Includes Deno configuration
Repository
Current version released
a year ago
Dependencies
std
Unique Array (Deno)
Heat | Release - Latest | Release - Pre | |
---|---|---|---|
| | () | () |
A Deno module to return unique array elements without any duplicated elements by ignore their reference points.
๐ Other Edition:
๐ Documentation
Getting Started
- Deno >= v1.34.0
import uniqueArray from "<URL>";// Default Import
Domain / Registry | URL |
---|---|
Deno Land | https://deno.land/x/unique_array[@<Tag>]/mod.ts |
DenoPKG | https://denopkg.com/hugoalh-studio/unique-array-deno[@<Tag>]/mod.ts |
GitHub Raw * | https://raw.githubusercontent.com/hugoalh-studio/unique-array-deno/<Tag>/mod.ts |
Pax | https://pax.deno.dev/hugoalh-studio/unique-array-deno[@<Tag>]/mod.ts |
*: Must provide a tag.
API
function uniqueArray<T>(item: T[]): T[];
Example
uniqueArray([{ foo: "bar" }, { foo: "bar" }, { bar: "gaz" }]); //=> [{ foo: "bar" }, { bar: "gaz" }]