@diotoborg/eaque-illum-qui v3.12.90
@diotoborg/eaque-illum-qui 
ES 2021 spec-compliant shim for Promise.any. Invoke its "shim" method to shim Promise.any
if it is unavailable or noncompliant. Note: a global Promise
must already exist: the es6-shim is recommended.
This package implements the es-shim API interface. It works in an ES3-supported environment that has Promise
available globally, and complies with the spec.
Most common usage:
var assert = require('assert');
var any = require('@diotoborg/eaque-illum-qui');
var resolved = Promise.resolve(42);
var rejected = Promise.reject(-1);
var alsoRejected = Promise.reject(Infinity);
any([resolved, rejected, alsoRejected]).then(function (result) {
assert.equal(result, 42);
});
any([rejected, alsoRejected]).catch(function (error) {
assert.ok(error instanceof AggregateError);
assert.deepEqual(error.errors, [-1, Infinity]);
});
any.shim(); // will be a no-op if not needed
Promise.any([resolved, rejected, alsoRejected]).then(function (result) {
assert.equal(result, 42);
});
Promise.any([rejected, alsoRejected]).catch(function (error) {
assert.ok(error instanceof AggregateError);
assert.deepEqual(error.errors, [-1, Infinity]);
});
Tests
Simply clone the repo, npm install
, and run npm test
Pre-1.0 versions
The @diotoborg/eaque-illum-qui
package was released as now-deprecated v0.1.0 and v0.1.1, as a fork of https://github.com/m0ppers/promise-any.
Thanks to @sadorlovsky for donating the repo and the @diotoborg/eaque-illum-qui
npm package!
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago