Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

absurdum

Package Overview
Dependencies
Maintainers
1
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

absurdum - npm Package Compare versions

Comparing version 0.27.0 to 0.28.0

docs/arrays/unique.md

18

dist/absurdum.cjs.js

@@ -466,2 +466,19 @@ 'use strict';

/**
* Removes all duplicate items of an array
*
* @param {Array} array input array
* @returns {Array} an array of unique values
* @example
* const result = arrays.unique([2, 1, 2]);
* console.log(result);
* > [2, 1]
*/
function unique (array) {
return [...array.reduce((acc, curr, i, arr) => {
acc.add(curr);
return acc;
}, new Set())];
}
/**
* Zip applies a specified function to the corresponding elements of two sequences,

@@ -523,2 +540,3 @@ * producing a sequence of the results.

tap: tap,
unique: unique,
zip: zip

@@ -525,0 +543,0 @@ });

@@ -462,2 +462,19 @@ /**

/**
* Removes all duplicate items of an array
*
* @param {Array} array input array
* @returns {Array} an array of unique values
* @example
* const result = arrays.unique([2, 1, 2]);
* console.log(result);
* > [2, 1]
*/
function unique (array) {
return [...array.reduce((acc, curr, i, arr) => {
acc.add(curr);
return acc;
}, new Set())];
}
/**
* Zip applies a specified function to the corresponding elements of two sequences,

@@ -519,2 +536,3 @@ * producing a sequence of the results.

tap: tap,
unique: unique,
zip: zip

@@ -521,0 +539,0 @@ });

2

package.json
{
"name": "absurdum",
"version": "0.27.0",
"version": "0.28.0",
"description": "Reductio Ad Absurdum - The Ridiculous Application of Reduce",

@@ -5,0 +5,0 @@ "keywords": [

@@ -67,2 +67,3 @@ [![GitHub release](https://img.shields.io/github/release/vanillaes/absurdum.svg)](https://github.com/vanillaes/absurdum/releases)

- [tap][arrays.tap]
- [unique][arrays.unique]
- [zip][arrays.zip]

@@ -88,2 +89,3 @@

[arrays.tap]: ./docs/arrays/tap.md
[arrays.unique]: ./docs/arrays.unique.md
[arrays.zip]: ./docs/arrays/zip.md

@@ -90,0 +92,0 @@

@@ -19,2 +19,3 @@ export { chunk } from './chunk.js';

export { tap } from './tap.js';
export { unique } from './unique.js';
export { zip } from './zip.js';
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