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.24 to 2.0.25

2

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

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -418,5 +418,22 @@ /**

/**
* Removes or replaces existing values.
* @param {Array} x source
* @param {number} i remove index
* @param {number?} n no. of values to remove (def: all till end)
* @param {...any} vs values to insert
* @returns {Array} [0->i, vs, i+n->end]
*/
function splice(x, i, n=x.length-i, ...vs) {
var a = x.slice(0, i);
for(var v of vs)
a.push(v);
for(var i=i+n, I=x.length; i<I; i++)
a.push(x[i]);
return a;
}
function searchl(x, fn, ths=null) {

@@ -448,14 +465,2 @@ for(var i=0, I=x.length; i<I; i++)

function splice(x, i, n=1, ...vs) {
var a = x.slice(0, i);
for(var v of vs)
a.push(v);
for(var i=i+n, I=x.length; i<I; i++)
a.push(x[i]);
return a;
}
/**

@@ -462,0 +467,0 @@ * Splits source into values, which do / dont satisfy the filter.

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