2.8.81 • Published 10 months ago

@taktikorg/sapiente-molestias v2.8.81

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@taktikorg/sapiente-molestias Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

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('@taktikorg/sapiente-molestias');

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 @taktikorg/sapiente-molestias 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 @taktikorg/sapiente-molestias npm package!

2.8.81

10 months ago

2.8.80

10 months ago

2.8.79

10 months ago

2.8.78

10 months ago

2.7.78

10 months ago

2.7.77

10 months ago

2.7.76

10 months ago

2.7.75

11 months ago

2.7.74

11 months ago

2.7.73

11 months ago

2.7.72

11 months ago

2.7.71

11 months ago

2.7.70

11 months ago

2.6.70

11 months ago

2.6.69

11 months ago

2.6.68

11 months ago

2.6.67

11 months ago

2.6.66

11 months ago

2.6.65

11 months ago

2.5.65

11 months ago

2.5.64

11 months ago

2.5.63

11 months ago

2.5.62

11 months ago

2.5.61

11 months ago

2.5.60

11 months ago

2.5.59

11 months ago

2.4.59

11 months ago

2.4.58

11 months ago

2.4.57

11 months ago

2.4.56

11 months ago

2.3.56

11 months ago

2.3.55

11 months ago

2.2.55

11 months ago

2.2.54

11 months ago

2.2.53

11 months ago

2.2.52

11 months ago

2.2.51

11 months ago

2.2.50

12 months ago

2.1.50

1 year ago

2.1.49

1 year ago

2.1.48

1 year ago

2.1.47

1 year ago

2.1.46

1 year ago

2.1.45

1 year ago

2.1.44

1 year ago

2.1.43

1 year ago

2.1.42

1 year ago

2.1.41

1 year ago

2.1.40

1 year ago

2.1.39

1 year ago

2.1.38

1 year ago

2.1.37

1 year ago

2.1.36

1 year ago

2.1.35

1 year ago

2.1.34

1 year ago

2.1.33

1 year ago

2.1.32

1 year ago

2.1.31

1 year ago

2.1.30

1 year ago

2.1.29

1 year ago

2.1.28

1 year ago

2.1.27

1 year ago

2.1.26

1 year ago

2.1.25

1 year ago

2.1.24

1 year ago

2.1.23

1 year ago

2.1.22

1 year ago

2.1.21

1 year ago

2.1.20

1 year ago

2.1.19

1 year ago

1.1.19

1 year ago

1.1.18

1 year ago

1.1.17

1 year ago

1.1.16

1 year ago

1.1.15

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago