JSPM

uniquify.js

1.2.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q37314F
  • License MIT

Lightweight package to parse and remove duplicate elements of a standard JavaScript array.

Package Exports

  • uniquify.js
  • uniquify.js/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (uniquify.js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

uniquify.js

Lightweight package to parse and remove duplicate elements of a standard JavaScript array.

Installation

// Using NPM
npm install uniquify.js

// Using Yarn
yarn add uniquify.js

Usage

// Using Require
const { uniquify } = require('uniquify.js');

// Using Import
import { uniquify } from 'uniquify.js';

Example

let myNums = [1, 2, 3, 1, 4, 1, 2, 5, 3, 4];
let uniqueNums = uniquify(myNums);
console.log(uniqueNums); // -> [1, 2, 3, 4, 5]