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 uni.js
// Using Yarn
yarn add uni.jsUsage
// Using Require
const { uniquify } = require('uni.js');
// Using Import
import { uniquify } from 'uni.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]