mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-23 06:59:29 -07:00
Add promise.allSettled polyfill
This commit is contained in:
parent
751a8cb6e3
commit
333acd5c0d
1 changed files with 12 additions and 0 deletions
|
@ -21,6 +21,18 @@ const serviceproviders = require('./serviceproviders')
|
||||||
const keys = require('./keys')
|
const keys = require('./keys')
|
||||||
const utils = require('./utils')
|
const utils = require('./utils')
|
||||||
|
|
||||||
|
// Promise.allSettled polyfill
|
||||||
|
Promise.allSettled = Promise.allSettled || ((promises) => Promise.all(promises.map(p => p
|
||||||
|
.then(v => ({
|
||||||
|
status: 'fulfilled',
|
||||||
|
value: v,
|
||||||
|
}))
|
||||||
|
.catch(e => ({
|
||||||
|
status: 'rejected',
|
||||||
|
reason: e,
|
||||||
|
}))
|
||||||
|
)));
|
||||||
|
|
||||||
const runVerificationJson = (
|
const runVerificationJson = (
|
||||||
res,
|
res,
|
||||||
proofData,
|
proofData,
|
||||||
|
|
Loading…
Reference in a new issue