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

arc-array

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arc-array - npm Package Compare versions

Comparing version 4.2.0 to 4.3.0

__tests__/async.js

7

__tests__/joinCallback.js

@@ -22,2 +22,9 @@ const ArcArray = require('../');

});
it('should throw an error if a non function is passed in as the callback', () => {
let testArray = new ArcArray();
expect(() => {
testArray.joinCallback('');
}).toThrow('ArcArray.joinCallback requires a valid callback to be passed in');
})
});

2

__tests__/rand.js

@@ -27,6 +27,4 @@ const ArcArray = require('../');

console.log(sequentialRuns);
expect(sequentialRuns).not.toEqual(testArray.length);
});
});

@@ -21,2 +21,8 @@ const is = require('arc-is');

});
it('show throw an error if wrapping non array', () => {
expect(() => {
ArcArray.wrap({});
}).toThrow('Cannot wrap value, valid array expected')
})
});

@@ -6,2 +6,7 @@ const is = require('arc-is');

joinCallback(_callback,_separator){
//If it's not empty, ensure our argument is correct
if(is(_callback) !== 'function'){
throw new TypeError('ArcArray.joinCallback requires a valid callback to be passed in');
}
//Don't bother if the array is empty

@@ -12,7 +17,2 @@ if(!this.length){

//If it's not empty, ensure our argument is correct
if(is(_callback) !== 'function'){
throw new TypeError('ArcArray.joinCallback requires a valid callback to be passed in');
}
//Normalize the separator

@@ -41,2 +41,6 @@ _separator = (is(_separator) === 'string' ? _separator : ',');

async pMap(_f) {
return Promise.all(this.map(_f))
}
//This is our format for evaluating named prototypes

@@ -43,0 +47,0 @@ toString(){

{
"name": "arc-array",
"version": "4.2.0",
"version": "4.3.0",
"description": "An array convenience subclass",

@@ -26,4 +26,8 @@ "main": "index.js",

"devDependencies": {
"jest": "^24.9.0"
"jest": "^27.3.1"
},
"jest": {
"verbose": true,
"collectCoverage": true
}
}
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