Socket
Socket
Sign inDemoInstall

items

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

items - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

0

CONTRIBUTING.md

@@ -0,0 +0,0 @@ # How to contribute

4

lib/index.js

@@ -36,3 +36,3 @@ 'use strict';

method(array[i], done);
method(array[i], done, i);
};

@@ -71,3 +71,3 @@

for (let i = 0; i < array.length; ++i) {
method(array[i], done);
method(array[i], done, i);
}

@@ -74,0 +74,0 @@ }

{
"name": "items",
"description": "Bare minimum async methods",
"version": "2.0.1",
"version": "2.1.0",
"repository": "git://github.com/hapijs/items",

@@ -6,0 +6,0 @@ "main": "lib/index.js",

@@ -0,0 +0,0 @@ #items

@@ -30,6 +30,8 @@ 'use strict';

const called = [];
const is = [];
const array = [1, 2, 3, 4, 5];
const method = function (item, next) {
const method = function (item, next, i) {
called.push(item);
is.push(i);
setTimeout(next, 5);

@@ -42,2 +44,3 @@ };

expect(called).to.deep.equal(array);
expect(is).to.deep.equal([0, 1, 2, 3, 4]);
done();

@@ -94,4 +97,6 @@ });

const array = [[1, 1], [2, 4], [3, 2], [4, 3], [5, 5]];
const method = function (item, next) {
const is = [];
const method = function (item, next, i) {
is.push(i);
setTimeout(() => {

@@ -108,2 +113,3 @@

expect(called).to.deep.equal([1, 3, 4, 2, 5]);
expect(is).to.deep.equal([0, 1, 2, 3, 4]);
done();

@@ -110,0 +116,0 @@ });

Sorry, the diff of this file is not supported yet

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