Array Utils is a utility package that provides various functions to manipulate arrays and objects. It is written in TypeScript.
Use the package manager npm to install Array Utils.
npm install @frm/array-utils
import { removeDuplicate } from '@frm/array-utils';
const originalArray = [
{ id: 1, name: 'Item 1' },
{ id: 2, name: 'Item 2' },
{ id: 1, name: 'Item 1' },
{ id: 3, name: 'Item 3' },
{ id: 2, name: 'Item 2' },
];
const result = removeDuplicate(originalArray, 'id');
console.log(result);
To run the unit tests, use the following command:
npm run test
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
MIT
This README.md
includes sections for the package name, installation instructions, usage examples, testing instructions, contributing guidelines, and the license.