
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
@288-toolkit/arrays
Advanced tools
npm i @288-toolkit/arrays
A collection of functions to work with arrays.
dedupeArray()Removes duplicates from an array of values (string | number | symbol | boolean).
dedupeArray([1, 2, 2, 2, '4', '5', '4', true, true]); // [1, 2, '4', '5', true]
dedupeArrayOfObjects()Removes duplicates from an array of objects based on the value of a key.
const people: Person[] = [
{ id: 1, name: 'John', age: 30 },
{ id: 2, name: 'Jane', age: 25 },
{ id: 3, name: 'John', age: 30 },
{ id: 4, name: 'Alice', age: 35 },
{ id: 5, name: 'Jane', age: 25 }
];
const uniquePeople = dedupeArrayOfObjects(people, 'name');
// [
// { id: 1, name: "John", age: 30 },
// { id: 2, name: "Jane", age: 25 },
// { id: 4, name: "Alice", age: 35 },
// ]
randomIndex()Returns a random index from an array with a random uniform distribution. See
randomInt
randomItem()Returns a random item from an array with a random uniform distribution. See
randomInt
shuffleArray()Creates a shuffled copy of an array.
FAQs
```sh npm i @288-toolkit/arrays ```
We found that @288-toolkit/arrays demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.