New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ariesclark/array

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ariesclark/array - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

6

package.json

@@ -5,3 +5,3 @@ {

"sideEffects": false,
"version": "0.2.1",
"version": "0.2.2",
"description": "",

@@ -19,7 +19,7 @@ "files": [

"dependencies": {
"@ariesclark/number": "^0.2.0"
"@ariesclark/number": "^0.2.1"
},
"devDependencies": {
"ts-readme": "^1.1.3",
"@ariesclark/object": "^0.2.0"
"@ariesclark/object": "^0.2.1"
},

@@ -26,0 +26,0 @@ "scripts": {

@@ -18,38 +18,2 @@ <div align="center">

## Usage
```ts
import { Array, group, unique } from '@ariesclark/array';
const evenOdd = item => (item % 2 === 0 ? 'even' : 'odd');
let value = [1, 2, 3, 4, 5];
let result = Array.group(value, evenOdd);
result = group(value, evenOdd); // Shorthand, equivalent to the above, tree-shakable.
console.log(result);
// {
// odd: [1, 3, 5],
// even: [2, 4]
// }
result = unique(
[
{ id: 1, name: 'Lorem ipsum' },
{ id: 2, name: 'Amet consectetur' },
{ id: 3, name: 'Sed do eiusmod' },
{ id: 2, name: 'Amet consectetur' }
],
({ id }) => id
);
console.log(result);
// [
// { id: 1, name: "Lorem ipsum" },
// { id: 2, name: "Amet consectetur" },
// { id: 3, name: "Sed do eiusmod" }
// ]
```
### Documentation

@@ -56,0 +20,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc