updated npm modules

This commit is contained in:
2019-05-20 20:43:45 -05:00
parent 2319197b81
commit f166b72b7d
1113 changed files with 8758 additions and 12227 deletions

8
node_modules/p-try/index.js generated vendored
View File

@@ -1,5 +1,9 @@
'use strict';
module.exports = (callback, ...args) => new Promise(resolve => {
resolve(callback(...args));
const pTry = (fn, ...arguments_) => new Promise(resolve => {
resolve(fn(...arguments_));
});
module.exports = pTry;
// TODO: remove this in the next major version
module.exports.default = pTry;

20
node_modules/p-try/package.json generated vendored
View File

@@ -1,8 +1,8 @@
{
"_from": "p-try@^2.0.0",
"_id": "p-try@2.0.0",
"_id": "p-try@2.2.0",
"_inBundle": false,
"_integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==",
"_integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"_location": "/p-try",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/p-limit"
],
"_resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz",
"_shasum": "85080bb87c64688fa47996fe8f7dfbe8211760b1",
"_resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"_shasum": "cb2868540e313d61de58fafbe35ce9004d5540e6",
"_spec": "p-try@^2.0.0",
"_where": "C:\\xampp\\htdocs\\w4rpservices\\node_modules\\p-limit",
"author": {
@@ -34,14 +34,16 @@
"deprecated": false,
"description": "`Start a promise chain",
"devDependencies": {
"ava": "*",
"xo": "*"
"ava": "^1.4.1",
"tsd": "^0.7.1",
"xo": "^0.24.0"
},
"engines": {
"node": ">=6"
},
"files": [
"index.js"
"index.js",
"index.d.ts"
],
"homepage": "https://github.com/sindresorhus/p-try#readme",
"keywords": [
@@ -66,7 +68,7 @@
"url": "git+https://github.com/sindresorhus/p-try.git"
},
"scripts": {
"test": "xo && ava"
"test": "xo && ava && tsd"
},
"version": "2.0.0"
"version": "2.2.0"
}

29
node_modules/p-try/readme.md generated vendored
View File

@@ -17,24 +17,35 @@ $ npm install p-try
```js
const pTry = require('p-try');
pTry(() => {
return synchronousFunctionThatMightThrow();
}).then(value => {
console.log(value);
}).catch(error => {
console.error(error);
});
(async () => {
try {
const value = await pTry(() => {
return synchronousFunctionThatMightThrow();
});
console.log(value);
} catch (error) {
console.error(error);
}
})();
```
## API
### pTry(fn, ...args)
### pTry(fn, ...arguments)
Returns a `Promise` resolved with the value of calling `fn(...args)`. If the function throws an error, the returned `Promise` will be rejected with that error.
Returns a `Promise` resolved with the value of calling `fn(...arguments)`. If the function throws an error, the returned `Promise` will be rejected with that error.
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.
#### fn
The function to run to start the promise chain.
#### arguments
Arguments to pass to `fn`.
## Related