$
This commit is contained in:
15
node_modules/@ungap/promise-all-settled/LICENSE
generated
vendored
Normal file
15
node_modules/@ungap/promise-all-settled/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
ISC License
|
||||
|
||||
Copyright (c) 2019, Andrea Giammarchi, @WebReflection
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
26
node_modules/@ungap/promise-all-settled/README.md
generated
vendored
Normal file
26
node_modules/@ungap/promise-all-settled/README.md
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
# Promise.allSettled
|
||||
|
||||
[](https://travis-ci.com/ungap/promise-all-settled) [](https://coveralls.io/github/ungap/promise-all-settled?branch=master) [](https://greenkeeper.io/) 
|
||||
|
||||
A cross platform [Promise.allSettled](https://github.com/tc39/proposal-promise-allSettled) polyfill.
|
||||
|
||||
* CDN global utility via https://unpkg.com/@ungap/promise-all-settled
|
||||
* ESM via `import allSettled from '@ungap/promise-all-settled'`
|
||||
* CJS via `const allSettled = require('@ungap/promise-all-settled')`
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```js
|
||||
const allSettled = require("@ungap/promise-all-settled");
|
||||
|
||||
// use it via call
|
||||
allSettled.call(Promise, []);
|
||||
|
||||
// or bind it:
|
||||
const $settled = allSettled.bind(Promise);
|
||||
|
||||
// or put it in the Promise class
|
||||
if (!Promise.allSettled)
|
||||
Promise.allSettled = allSettled;
|
||||
```
|
19
node_modules/@ungap/promise-all-settled/cjs/index.js
generated
vendored
Normal file
19
node_modules/@ungap/promise-all-settled/cjs/index.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
var allSettled = Promise.allSettled || function ($) {'use strict';
|
||||
var self = this;
|
||||
return self.all(
|
||||
$.map(
|
||||
function (value) {
|
||||
return self.resolve(value).then(this.$, this._);
|
||||
},
|
||||
{
|
||||
$: function (value) {
|
||||
return {status: 'fulfilled', value: value};
|
||||
},
|
||||
_: function (reason) {
|
||||
return {status: 'rejected', reason: reason};
|
||||
}
|
||||
}
|
||||
)
|
||||
);
|
||||
};
|
||||
module.exports = allSettled;
|
1
node_modules/@ungap/promise-all-settled/cjs/package.json
generated
vendored
Normal file
1
node_modules/@ungap/promise-all-settled/cjs/package.json
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"type":"commonjs"}
|
19
node_modules/@ungap/promise-all-settled/esm/index.js
generated
vendored
Normal file
19
node_modules/@ungap/promise-all-settled/esm/index.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
var allSettled = Promise.allSettled || function ($) {'use strict';
|
||||
var self = this;
|
||||
return self.all(
|
||||
$.map(
|
||||
function (value) {
|
||||
return self.resolve(value).then(this.$, this._);
|
||||
},
|
||||
{
|
||||
$: function (value) {
|
||||
return {status: 'fulfilled', value: value};
|
||||
},
|
||||
_: function (reason) {
|
||||
return {status: 'rejected', reason: reason};
|
||||
}
|
||||
}
|
||||
)
|
||||
);
|
||||
};
|
||||
export default allSettled;
|
18
node_modules/@ungap/promise-all-settled/index.js
generated
vendored
Normal file
18
node_modules/@ungap/promise-all-settled/index.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
var allSettled = Promise.allSettled || function ($) {'use strict';
|
||||
var self = this;
|
||||
return self.all(
|
||||
$.map(
|
||||
function (value) {
|
||||
return self.resolve(value).then(this.$, this._);
|
||||
},
|
||||
{
|
||||
$: function (value) {
|
||||
return {status: 'fulfilled', value: value};
|
||||
},
|
||||
_: function (reason) {
|
||||
return {status: 'rejected', reason: reason};
|
||||
}
|
||||
}
|
||||
)
|
||||
);
|
||||
};
|
1
node_modules/@ungap/promise-all-settled/min.js
generated
vendored
Normal file
1
node_modules/@ungap/promise-all-settled/min.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var allSettled=Promise.allSettled||function(t){"use strict";var e=this;return e.all(t.map(function(t){return e.resolve(t).then(this.$,this._)},{$:function(t){return{status:"fulfilled",value:t}},_:function(t){return{status:"rejected",reason:t}}}))};
|
44
node_modules/@ungap/promise-all-settled/package.json
generated
vendored
Normal file
44
node_modules/@ungap/promise-all-settled/package.json
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "@ungap/promise-all-settled",
|
||||
"version": "1.1.2",
|
||||
"description": "A cross platform Promise.allSettled polyfill",
|
||||
"main": "./cjs/index.js",
|
||||
"module": "./esm/index.js",
|
||||
"unpkg": "min.js",
|
||||
"scripts": {
|
||||
"build": "npm run cjs && npm run esm && npm run min && npm run test && npm run size",
|
||||
"cjs": "cp index.js cjs/ && echo 'module.exports = allSettled;' >> cjs/index.js",
|
||||
"esm": "cp index.js esm/ && echo 'export default allSettled;' >> esm/index.js",
|
||||
"min": "uglifyjs index.js --support-ie8 --comments=/^!/ -c -m -o min.js",
|
||||
"size": "cat index.js | wc -c && cat min.js | wc -c && gzip -c9 min.js | wc -c && cat min.js | brotli | wc -c",
|
||||
"coveralls": "nyc report --reporter=text-lcov | coveralls",
|
||||
"test": "nyc node test/index.js"
|
||||
},
|
||||
"keywords": [
|
||||
"Promise",
|
||||
"allSettled",
|
||||
"polyfill",
|
||||
"utility",
|
||||
"ungap"
|
||||
],
|
||||
"author": "Andrea Giammarchi",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"coveralls": "^3.1.0",
|
||||
"nyc": "^15.0.1",
|
||||
"uglify-js": "^3.9.1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ungap/promise-all-settled.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/ungap/promise-all-settled/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ungap/promise-all-settled#readme",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"import": "./esm/index.js",
|
||||
"default": "./cjs/index.js"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user