summaryrefslogtreecommitdiff
path: root/deps/node/deps/npm/node_modules/libnpmconfig/node_modules/p-limit
diff options
context:
space:
mode:
Diffstat (limited to 'deps/node/deps/npm/node_modules/libnpmconfig/node_modules/p-limit')
-rw-r--r--deps/node/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/index.js49
-rw-r--r--deps/node/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/license9
-rw-r--r--deps/node/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/package.json81
-rw-r--r--deps/node/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/readme.md90
4 files changed, 0 insertions, 229 deletions
diff --git a/deps/node/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/index.js b/deps/node/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/index.js
deleted file mode 100644
index 86decabb..00000000
--- a/deps/node/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/index.js
+++ /dev/null
@@ -1,49 +0,0 @@
-'use strict';
-const pTry = require('p-try');
-
-module.exports = concurrency => {
- if (concurrency < 1) {
- throw new TypeError('Expected `concurrency` to be a number from 1 and up');
- }
-
- const queue = [];
- let activeCount = 0;
-
- const next = () => {
- activeCount--;
-
- if (queue.length > 0) {
- queue.shift()();
- }
- };
-
- const run = (fn, resolve, ...args) => {
- activeCount++;
-
- const result = pTry(fn, ...args);
-
- resolve(result);
-
- result.then(next, next);
- };
-
- const enqueue = (fn, resolve, ...args) => {
- if (activeCount < concurrency) {
- run(fn, resolve, ...args);
- } else {
- queue.push(run.bind(null, fn, resolve, ...args));
- }
- };
-
- const generator = (fn, ...args) => new Promise(resolve => enqueue(fn, resolve, ...args));
- Object.defineProperties(generator, {
- activeCount: {
- get: () => activeCount
- },
- pendingCount: {
- get: () => queue.length
- }
- });
-
- return generator;
-};
diff --git a/deps/node/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/license b/deps/node/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/license
deleted file mode 100644
index e7af2f77..00000000
--- a/deps/node/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/license
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/node/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/package.json b/deps/node/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/package.json
deleted file mode 100644
index 233b3f13..00000000
--- a/deps/node/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/package.json
+++ /dev/null
@@ -1,81 +0,0 @@
-{
- "_from": "p-limit@^2.0.0",
- "_id": "p-limit@2.1.0",
- "_inBundle": false,
- "_integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==",
- "_location": "/libnpmconfig/p-limit",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "p-limit@^2.0.0",
- "name": "p-limit",
- "escapedName": "p-limit",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/libnpmconfig/p-locate"
- ],
- "_resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz",
- "_shasum": "1d5a0d20fb12707c758a655f6bbc4386b5930d68",
- "_spec": "p-limit@^2.0.0",
- "_where": "/Users/zkat/Documents/code/work/npm/node_modules/libnpmconfig/node_modules/p-locate",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/p-limit/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "p-try": "^2.0.0"
- },
- "deprecated": false,
- "description": "Run multiple promise-returning & async functions with limited concurrency",
- "devDependencies": {
- "ava": "^1.0.1",
- "delay": "^4.1.0",
- "in-range": "^1.0.0",
- "random-int": "^1.0.0",
- "time-span": "^2.0.0",
- "xo": "^0.23.0"
- },
- "engines": {
- "node": ">=6"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/sindresorhus/p-limit#readme",
- "keywords": [
- "promise",
- "limit",
- "limited",
- "concurrency",
- "throttle",
- "throat",
- "rate",
- "batch",
- "ratelimit",
- "task",
- "queue",
- "async",
- "await",
- "promises",
- "bluebird"
- ],
- "license": "MIT",
- "name": "p-limit",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/p-limit.git"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "version": "2.1.0"
-}
diff --git a/deps/node/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/readme.md b/deps/node/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/readme.md
deleted file mode 100644
index 92a6dbf7..00000000
--- a/deps/node/deps/npm/node_modules/libnpmconfig/node_modules/p-limit/readme.md
+++ /dev/null
@@ -1,90 +0,0 @@
-# p-limit [![Build Status](https://travis-ci.org/sindresorhus/p-limit.svg?branch=master)](https://travis-ci.org/sindresorhus/p-limit)
-
-> Run multiple promise-returning & async functions with limited concurrency
-
-
-## Install
-
-```
-$ npm install p-limit
-```
-
-
-## Usage
-
-```js
-const pLimit = require('p-limit');
-
-const limit = pLimit(1);
-
-const input = [
- limit(() => fetchSomething('foo')),
- limit(() => fetchSomething('bar')),
- limit(() => doSomething())
-];
-
-(async () => {
- // Only one promise is run at once
- const result = await Promise.all(input);
- console.log(result);
-})();
-```
-
-
-## API
-
-### pLimit(concurrency)
-
-Returns a `limit` function.
-
-#### concurrency
-
-Type: `number`<br>
-Minimum: `1`
-
-Concurrency limit.
-
-### limit(fn, ...args)
-
-Returns the promise returned by calling `fn(...args)`.
-
-#### fn
-
-Type: `Function`
-
-Promise-returning/async function.
-
-#### ...args
-
-Any arguments to pass through to `fn`.
-
-Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a *lot* of functions.
-
-### limit.activeCount
-
-The number of promises that are currently running.
-
-### limit.pendingCount
-
-The number of promises that are waiting to run (i.e. their internal `fn` was not called yet).
-
-
-## FAQ
-
-### How is this different from the [`p-queue`](https://github.com/sindresorhus/p-queue) package?
-
-This package is only about limiting the number of concurrent executions, while `p-queue` is a fully featured queue implementation with lots of different options, introspection, and ability to pause and clear the queue.
-
-
-## Related
-
-- [p-queue](https://github.com/sindresorhus/p-queue) - Promise queue with concurrency control
-- [p-throttle](https://github.com/sindresorhus/p-throttle) - Throttle promise-returning & async functions
-- [p-debounce](https://github.com/sindresorhus/p-debounce) - Debounce promise-returning & async functions
-- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency
-- [More…](https://github.com/sindresorhus/promise-fun)
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)