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

@josecarlosrz/array-helper

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@josecarlosrz/array-helper - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "@josecarlosrz/array-helper",
"version": "1.0.2",
"version": "1.0.3",
"description": "Array helper to have async behavior and some util methods",

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

@@ -5,28 +5,31 @@ const arrayHelper = require('./');

function waitFor(seconds)
{
const obj = {
return new Promise(function(resolve, reject) {
waitFor: function(seconds) {
console.log('ok, waiting for ' + seconds + ' seconds');
setTimeout(function() {
return new Promise(function(resolve, reject) {
console.log('done!');
resolve();
console.log('ok, waiting for ' + seconds + ' seconds');
}, seconds * 1000);
setTimeout(function() {
console.log('done!');
resolve();
}, seconds * 1000);
});
});
},
}
};
(async function() {
const y = await arrayHelper.filter(x, async function(element) {
const y = await arrayHelper.map(x, async function(element) {
await waitFor(element);
return element === 4;
await this.waitFor(element);
return element * 2;
});
}, obj);

@@ -33,0 +36,0 @@ console.log(y);

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