1.0.6 • Published 1 year ago
stripe-dupliacate-from-array v1.0.6
stripe-duplicate-from-array
Stripe-duplicate-from-array is a simple npm package that allows you to remove duplicate elements from an array.
Installation
You can install this package using npm by running the following command in your terminal:
npm install stripe-duplicate-from-array
Usage
To use the package, simply import it into your project and call the removeDuplicates
function with an array as its argument:
const { removeDuplicates } = require('stripe-duplicate-from-array');
const array = [1, 2, 3, 4, 4, 5];
const uniqueArray = removeDuplicates(array);
console.log(uniqueArray); // [1, 2, 3, 4, 5]
//You can also use this package with TypeScript, as it has built-in support.
import { removeDuplicates } from 'stripe-duplicate-from-array';
const array: string[] = ['foo', 'bar', 'baz', 'bar'];
const uniqueArray: string[] = removeDuplicates(array);
console.log(uniqueArray); // ['foo', 'bar', 'baz']
License This package is licensed under the MIT License. Feel free to use it in your personal or commercial projects. Contributions are welcome!