2.1.123 • Published 10 months ago

@diotoborg/eveniet-magnam v2.1.123

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

@diotoborg/eveniet-magnam 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('@diotoborg/eveniet-magnam');

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/eveniet-magnam 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/eveniet-magnam npm package!

mochatestresolvejasminedragpackage.jsonglobalsStreamsstyleswfforEachmulti-packageeventDispatcherdefinePropertytypeerrorTypeScriptHyBimodulestringtoobjecttostringtagES2015clientcall-boundhelpersairbnbutil.inspect[[Prototype]]parentloggingcolorszerogroupByidentifiersmruBigInt64ArrayRxa11yURLSearchParamssidevisualpositiveECMAScript 2017argspackagessource mapharmonycss-in-jspinorecursiveURLasciiObject.entriesECMAScript 3emrweakmapignoresomeownjsonschemaECMAScript 2015formsinstallinternal slotconcatMapidlegraphqlcloudformationrm -rfviewcallbackcoverageStyleSheetmakejoiconcatclassesagentdeep-copycolortraversetransportArrayBufferstructuredCloneprototypesnsyamlES2020JSON-SchemaFunction.prototype.nameWebSocketsES7importchildObject.getPrototypeOftrimLeftclioptimistfantasy-landeventEmitterpipelintrouterurlcjkcontainsdefinewindowrandomvariablesjsdomexecuteoptionschemeramdavaluedeletettyfromObject.isawesomesauceexeclocalplugintypescripttestingObject.definePropertypatchString.prototype.matchAllreuseeslintbundlerArray.prototype.flates-shimsglacierframeworkspawnautoprefixerrequireutilitycssjestconfigprunermdirsortedfinduponcejsdiffFloat64Arraysafequeuesqstslibshellvalides7jsonfastcopymapreducestreamsguidtshardlinksinfindLaststyled-components.envreact-hooksnegativeES2016fpECMAScriptreal-timelocationhasSymbol.toStringTagrulesoffsetfullwidthwidthstringifytypeofinspectPromisecode pointsdom-testing-librarystreamfunctionsrequestfast-copyflagsebsselfcolumnspreprocessormapsetPrototypeOfArray.prototype.flattensearchTypedArrayamazonsesnodeECMAScript 7pyyamlelasticachetoolkitES2018bundlingtextreadSetartsettingsObject.valuesdatacurriedruntimenopeisConcatSpreadableregular expressiontypedextendargumentschemadependenciesfixed-widthtrimStartes2016flatMapinstallerjson-schema-validationreact posegroupimmutablehelperenumerableomit_.extendstringifierrestfulclassnamedircoerciblejsxes2015appatomdataviewsuperstructCSSprogresscharactersglobMicrosoftxtermmake dirparserInt32ArrayutilbyteOffsetcirculartypespackage managerfetchcomparekoreanhookformtransformscheme-validationassertionArrayBuffer#slicebddoutputcloudwatchreactpropeslintpluginStreamajvupasterisksString.prototype.trimcallboundajaxcharacterECMAScript 2023callbindpuremkdirpRFC-6455feedextraenvironmentsdependency managerasts3packagedomwriteasynckeysformattingwgettypanionreworkbeanstalkawsReactiveXparentsemitcolourentriesstylingmkdirjavascriptcreate
2.1.123

10 months ago

2.1.122

10 months ago

2.1.121

10 months ago

2.1.120

10 months ago

2.1.119

10 months ago

2.1.118

10 months ago

2.1.117

10 months ago

2.1.116

10 months ago

2.1.115

10 months ago

2.0.115

10 months ago

2.0.114

10 months ago

2.0.113

10 months ago

2.0.112

10 months ago

2.0.111

10 months ago

2.0.110

10 months ago

2.0.109

10 months ago

2.0.108

10 months ago

2.0.107

10 months ago

2.0.106

10 months ago

2.0.105

10 months ago

2.0.104

10 months ago

2.0.103

10 months ago

2.0.102

11 months ago

2.0.101

11 months ago

2.0.100

11 months ago

2.0.99

11 months ago

2.0.98

11 months ago

2.0.97

11 months ago

2.0.96

11 months ago

2.0.95

11 months ago

2.0.94

11 months ago

2.0.93

11 months ago

2.0.92

11 months ago

2.0.91

11 months ago

2.0.90

11 months ago

2.0.89

11 months ago

2.0.88

11 months ago

2.0.87

11 months ago

2.0.86

11 months ago

2.0.85

11 months ago

2.0.84

11 months ago

2.0.83

11 months ago

2.0.82

11 months ago

2.0.81

11 months ago

2.0.80

11 months ago

2.0.79

11 months ago

2.0.78

11 months ago

2.0.77

11 months ago

2.0.76

11 months ago

2.0.75

11 months ago

2.0.74

11 months ago

2.0.73

11 months ago

2.0.72

12 months ago

2.0.71

12 months ago

2.0.70

12 months ago

2.0.69

12 months ago

2.0.68

12 months ago

2.0.67

12 months ago

2.0.66

12 months ago

2.0.65

12 months ago

2.0.64

12 months ago

2.0.63

12 months ago

2.0.62

12 months ago

2.0.61

12 months ago

2.0.60

12 months ago

2.0.59

12 months ago

2.0.58

12 months ago

2.0.57

12 months ago

2.0.56

12 months ago

2.0.55

12 months ago

2.0.54

12 months ago

2.0.53

12 months ago

2.0.52

1 year ago

2.0.51

1 year ago

2.0.50

1 year ago

2.0.49

1 year ago

2.0.48

1 year ago

2.0.47

1 year ago

2.0.46

1 year ago

2.0.45

1 year ago

2.0.44

1 year ago

2.0.43

1 year ago

2.0.42

1 year ago

2.0.41

1 year ago

2.0.40

1 year ago

2.0.39

1 year ago

2.0.38

1 year ago

2.0.37

1 year ago

2.0.36

1 year ago

2.0.35

1 year ago

2.0.34

1 year ago

2.0.33

1 year ago

2.0.32

1 year ago

2.0.31

1 year ago

2.0.30

1 year ago

2.0.29

1 year ago

2.0.28

1 year ago

1.0.28

1 year ago

1.0.27

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

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.11

1 year ago

1.0.10

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