/remove-dupl

Removing duplicates from arrays and files

Primary LanguageJavaScriptMIT LicenseMIT

Removing duplicates from arrays and files

npm version license

Instalation

NPM:

npm i remove-dupl --save

Yarn:

yarn add remove-dupl

Usage

const { removeFromArray, removeFromFile } = require("remove-dupl");

const newArr = removeFromArray([1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0]);
const count = removeFromFile("PATH_TO_FILE", "PATH_TO_NEW_FILE");

If the path to the new file is empty, it will overwrite the original file.

License

MIT © Joyent, Inc. and other Node contributors