npm install remove-duplicates-items --save-dev
.cjs file extension
const removeDuplicates = require('remove-duplicates-items');
const removeDuplicates = require('remove-duplicates-items');
const arrayWithDuplicates = ['abc', 'bca', 'abc', 'cba'];
console.log('Array without duplicates:', removeDuplicates(arrayWithDuplicates)); // [ 'abc', 'bca', 'cba' ]