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

p-limit

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

p-limit - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

4

index.js
'use strict';
const pTry = require('p-try');
module.exports = concurrency => {

@@ -22,3 +24,3 @@ if (concurrency < 1) {

fn().then(
pTry(() => fn()).then(
val => {

@@ -25,0 +27,0 @@ resolve(val);

{
"name": "p-limit",
"version": "1.1.0",
"description": "Run multiple promise-returning & async functions with limited concurrency",
"license": "MIT",
"repository": "sindresorhus/p-limit",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"promise",
"limit",
"limited",
"concurrency",
"throttle",
"throat",
"rate",
"batch",
"ratelimit",
"task",
"queue",
"async",
"await",
"promises",
"bluebird"
],
"devDependencies": {
"ava": "*",
"delay": "^1.3.1",
"in-range": "^1.0.0",
"random-int": "^1.0.0",
"time-span": "^1.0.0",
"xo": "*"
},
"xo": {
"esnext": true
}
"name": "p-limit",
"version": "1.2.0",
"description": "Run multiple promise-returning & async functions with limited concurrency",
"license": "MIT",
"repository": "sindresorhus/p-limit",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"promise",
"limit",
"limited",
"concurrency",
"throttle",
"throat",
"rate",
"batch",
"ratelimit",
"task",
"queue",
"async",
"await",
"promises",
"bluebird"
],
"dependencies": {
"p-try": "^1.0.0"
},
"devDependencies": {
"ava": "*",
"delay": "^2.0.0",
"in-range": "^1.0.0",
"random-int": "^1.0.0",
"time-span": "^2.0.0",
"xo": "*"
}
}

@@ -9,3 +9,3 @@ # p-limit [![Build Status](https://travis-ci.org/sindresorhus/p-limit.svg?branch=master)](https://travis-ci.org/sindresorhus/p-limit)

```
$ npm install --save p-limit
$ npm install p-limit
```

@@ -27,6 +27,7 @@

// only one promise is run at once
Promise.all(input).then(result => {
(async () => {
// Only one promise is run at once
const result = await Promise.all(input);
console.log(result);
});
})();
```

@@ -33,0 +34,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