pnpm
Version:
Fast, disk space efficient package manager
134 lines (133 loc) • 6.33 kB
JSON
{
"_args": [
[
{
"raw": "p-limit@2.2.0",
"scope": null,
"escapedName": "p-limit",
"name": "p-limit",
"rawSpec": "2.2.0",
"spec": "2.2.0",
"type": "version"
},
"/home/zoltan/src/pnpm/pnpm/packages/pnpm"
]
],
"_from": "p-limit@2.2.0",
"_hasShrinkwrap": false,
"_id": "p-limit@2.2.0",
"_location": "/p-limit",
"_nodeVersion": "10.15.1",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/p-limit_2.2.0_1551554473384_0.12635434710499815"
},
"_npmUser": {
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
},
"_npmVersion": "6.8.0",
"_phantomChildren": {},
"_requested": {
"raw": "p-limit@2.2.0",
"scope": null,
"escapedName": "p-limit",
"name": "p-limit",
"rawSpec": "2.2.0",
"spec": "2.2.0",
"type": "version"
},
"_requiredBy": [
"/",
"/@pnpm/headless",
"/@pnpm/list",
"/@pnpm/npm-resolver",
"/@pnpm/package-requester",
"/@pnpm/package-store",
"/@pnpm/server",
"/dint",
"/p-locate",
"/run-groups",
"/supi"
],
"_resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz",
"_shasum": "417c9941e6027a9abcba5092dd2904e255b5fbc2",
"_shrinkwrap": null,
"_spec": "p-limit@2.2.0",
"_where": "/home/zoltan/src/pnpm/pnpm/packages/pnpm",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/p-limit/issues"
},
"dependencies": {
"p-try": "^2.0.0"
},
"description": "Run multiple promise-returning & async functions with limited concurrency",
"devDependencies": {
"ava": "^1.2.1",
"delay": "^4.1.0",
"in-range": "^1.0.0",
"random-int": "^1.0.0",
"time-span": "^2.0.0",
"tsd-check": "^0.3.0",
"xo": "^0.24.0"
},
"directories": {},
"dist": {
"integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==",
"shasum": "417c9941e6027a9abcba5092dd2904e255b5fbc2",
"tarball": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz",
"fileCount": 5,
"unpackedSize": 6214,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJceteqCRA9TVsSAnZWagAA/FIP/iuBAUVmHWwLVpBIBoqF\nIdjwVBtPFMeaK0HmyqXpiFybcoKTDdvBelQVadnvZPXGSoyvOTvCl/ajb389\n69Rzqf/QTQ/Jf4B1j2fG6/VLANlpUIjhUplczpSE5YzMGWQYdeEm00Nh2Hv6\nQiLPTvP8E525mXRszDQOl22jVx9mFfhnIhz35RjAq9p7XdFcHv65BJTgB6e4\nHQI6x9fEilPxRHtHEqzrw10omW03k08UFet5faSsnlj5gRyI6tAwtrUWVBzS\ndJKwRKq2IjlVJJNe+BV/iTuS5HII6MBhC0VmP4Xfa1I5OLFc7qGXYWALikmu\nz9OdGh4Fh7UkEd+jJBFFcS2vXNeQ8RoWuSaBjXMDWEWe808iaqY6Z4+SA54i\n8bmPD2vqjvqx2CQhCz3QN/OuUWN1j7nJdkSKktI2Zz5aA4iLT/r0U2urxM7F\nG1FbhNo3MvEHxuvQ3xSPeiKLVtmRAbmS7uxLaOWzTKsa3AVz5qgt872egxlA\nTaqpNnkDvi/swk4dl4/8ZfPzVG9W5i+jnmv2FWFxTf5LU/RtDsIJ4G7u383t\ndIaViZ9U8XlTvpnJOYDhzH3PtrmBhd8euDbeUs29SSVgSX7SPRPrWyzduZb6\nplIzjCHgbokM34y2MZ9iSNqwJy/p2zlwWFNn/4kCwephyfkFlz/6on2tAvns\nojg6\r\n=jlw5\r\n-----END PGP SIGNATURE-----\r\n"
},
"engines": {
"node": ">=6"
},
"files": [
"index.js",
"index.d.ts"
],
"gitHead": "0320e8b5e9b9ff66db20f98aa4cf235146768bcd",
"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",
"maintainers": [
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
}
],
"name": "p-limit",
"optionalDependencies": {},
"readme": "# p-limit [](https://travis-ci.org/sindresorhus/p-limit)\n\n> Run multiple promise-returning & async functions with limited concurrency\n\n\n## Install\n\n```\n$ npm install p-limit\n```\n\n\n## Usage\n\n```js\nconst pLimit = require('p-limit');\n\nconst limit = pLimit(1);\n\nconst input = [\n\tlimit(() => fetchSomething('foo')),\n\tlimit(() => fetchSomething('bar')),\n\tlimit(() => doSomething())\n];\n\n(async () => {\n\t// Only one promise is run at once\n\tconst result = await Promise.all(input);\n\tconsole.log(result);\n})();\n```\n\n\n## API\n\n### pLimit(concurrency)\n\nReturns a `limit` function.\n\n#### concurrency\n\nType: `number`<br>\nMinimum: `1`\n\nConcurrency limit.\n\n### limit(fn, ...args)\n\nReturns the promise returned by calling `fn(...args)`.\n\n#### fn\n\nType: `Function`\n\nPromise-returning/async function.\n\n#### args\n\nAny arguments to pass through to `fn`.\n\nSupport 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.\n\n### limit.activeCount\n\nThe number of promises that are currently running.\n\n### limit.pendingCount\n\nThe number of promises that are waiting to run (i.e. their internal `fn` was not called yet).\n\n\n## FAQ\n\n### How is this different from the [`p-queue`](https://github.com/sindresorhus/p-queue) package?\n\nThis 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.\n\n\n## Related\n\n- [p-queue](https://github.com/sindresorhus/p-queue) - Promise queue with concurrency control\n- [p-throttle](https://github.com/sindresorhus/p-throttle) - Throttle promise-returning & async functions\n- [p-debounce](https://github.com/sindresorhus/p-debounce) - Debounce promise-returning & async functions\n- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency\n- [More…](https://github.com/sindresorhus/promise-fun)\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n",
"readmeFilename": "readme.md",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/p-limit.git"
},
"scripts": {
"test": "xo && ava && tsd-check"
},
"version": "2.2.0"
}