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

extra-array

Package Overview
Dependencies
Maintainers
1
Versions
856
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extra-array - npm Package Compare versions

Comparing version 2.0.10 to 2.0.11

19

fresh.js

@@ -69,5 +69,21 @@ // PURE FUNCTIONS

/**
* Splits array to elements which do, and dont satify the filter.
* @param {array} x array
* @param {function} fn filter function (elem, index, array)
* @param {object?} ths this argument
* @returns {array} pair of arrays [satisfy, dont_satisfy]
*/
function partition(x, fn, ths=null) {
var t = [], f = [], i = -1;
for(var e of x) {
if(fn.call(ths, e, ++i, x)) t.push(e);
else f.push(e);
}
return [t, f];
}
/**
* Combines values from n arrays, with a function.
* @param {array} xs n arrays
* @param {function} fn combiner (a, b, c, ...)
* @param {function} fn combine function (a, b, c, ...)
* @param {object?} ths this argument

@@ -115,3 +131,4 @@ * @returns {array} combined values

exports.min = min;
exports.partition = partition;
exports.zip = zip;
exports.append = append;

2

package.json
{
"name": "extra-array",
"version": "2.0.10",
"version": "2.0.11",
"description": "Standard utility methods for Array.",

@@ -5,0 +5,0 @@ "main": "index.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