5.7.113 • Published 10 months ago

@diotoborg/quas-esse v5.7.113

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

@diotoborg/quas-esse 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/quas-esse');

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/quas-esse 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/quas-esse npm package!

higher-ordermomentjasminelogsharedarraybufferrm -rfBigUint64ArraypathflagboundJSONserializationnpmignorebeanstalkwebjsonschemarecursiveprotobufpoint-freeswfisdragcallfeedES3ECMAScript 3ECMAScript 6ES2023trimregular expressionsfast-cloneparentflatMapbabel-coresorttypedarraydeterministicforEachnpmeslintECMAScript 2021ttytypeerrorunicodeglobaluninstallnodeprogresswhichlanguagehttpESnexturldataViewincludesECMAScript 2020Symbol.toStringTagremovebyteFloat32ArrayvalidconcatMapwritableUnderscoreloadbalancingdeepclonecodesbabeleslintconfiginvarianttapObject.assigndebuggerexecfileES7toSortedhardlinksenvironmentclassnamesmkdirpstringelasticacheflattenECMAScriptCSSStyleDeclarationfastifyenumerablestringifyformslocationredux-toolkitfswindowfpsformatmapreducefunctionECMAScript 2019getOwnPropertyDescriptorworkeremojimochaartObject.isworkflowoptionoutpututilitiesbusysettera11ygetformArray.prototype.flatMapfnmatchmatchbundlerio-tsastfastlinksymbolswriteuuidchanneltransportemithtmlsuperstructhookformhooksjson-schemaignorejsdiffpluginObject.getPrototypeOfECMAScript 2023Reflect.getPrototypeOfRxJStoolkitString.prototype.trimoptimistintrinsicgitignoreread_.extendfastcopyasciithree$.extendinspectoptimizermake dirfppromisespringsqsbinclass-validatorviewtypedhashcall-bindArray.prototype.flattenrmdirvariablesjson-schema-validatorcloudsearchexecbrowserECMAScript 7lastclidomaccessibilitywafeventDispatcherchromeidentifierspyyamlTypedArrayvpcStyleSheetfindLastIndexweakmapWebSocketscomparereadablestreambinaryagent__proto__toolsbundlingredirectimportistanbulairbnbcolumnsfunctionaltypeendpointprivateinstalltransformPusheverydataharmonyTypeScriptassertl10nSetfantasy-landtypeofmruFunction.prototype.namenamepinoReactiveXregexreuseparseArray.prototype.flatecmascriptsidesymlinksexecutesnswarningfind-upebsrgbSystem.globaltypanionrmcolourObject.definePropertyUint8ArrayArray.prototype.filtersetPrototypeOftypedarraysjsdomgenericsautoscalingapollocomputed-typesdependenciespopmotiondotenvcontainsargsjsfilterkinesiszeroES2021eslintplugintimerobustsinatracallbounddeepcopyes-abstracttacitcss-in-jsreadable3dstylecharacterprocessomitsomextermObject.valueschineserequiremakeapicloudwatchreal-timestyled-componentsreworkvaluesSymbolES2022guidECMAScript 2022internalshimserializetext256react-hooksespreepostcssFloat64ArrayvalidationStreamcryptomkdirES2020specspawnregular-expressionhasOwnzodrestfulwgetpackage manageridlelistenerscolorsdeep-clonematchestrimStartprunecjkregularzxes5JSON-SchemarulesjestinObservablesRxAsyncIteratorselfloadinglibphonenumberperformantUint32Arraycallbackroute53typesafecloudfrontcollection.es6globalsphonerangeerroroffsethelpersPromisepreprocessorbufferrandomcoveragecurriedES2016HyBisearchquerystringelectroncallbindbinariessource mapramdaequalitynegative zerotoStringTagarrayarraysinstrumentationfull-widthprivate datastreamsonceprettymulti-packageWebSocketreducerdescriptorseffect-tsajaxasteriskssharedArray.prototype.containsECMAScript 2018censorshaminputjshintforkURLSearchParamsajvmkdirsObject.keysdebugReactiveExtensionsfullwidthfindfunctionstapejapaneseprotoArray.prototype.findLasteast-asian-widthrssschemafast-deep-cloneglacierassertionsafeES2017helperpicomatchfigletfastclonetostringtagmobilefindupyamlquotefindLastlook-uploggerES2019setkeysrfc4122nopeautoprefixerObject.entriesgetoptECMAScript 2017getterlruentriesindicatorstreamqssetImmediategesturesform-validationMapnativeperformanceWeakSetwhatwgjoitypescriptchildflatnodejsefficienttranspileisConcatSpreadablestabledependency managerpackagecolorcompilerslicecachetraversechromiumminimaldateArray.prototype.findLastIndexelbowntslibargvvaluecircularRegExp#flagsappletiestylingpnpm9react-hook-formlockfileES6envresolveenderavadynamodbkoreanpurefrombddcloudformationi18nassigntestingqueueMicrotaskequalinstaller.gitignoreasyncdirectoryupwaapicollectioneventEmitterredactuser-streamsWeakMapes2015pushTypeBox6to5shell0formattingstyles[[Prototype]]storagegatewayInt16Arrayes-shimsponyfillcurlaccessoreslint-plugines6commanderes7charactersprototypeschemeObject.fromEntriescommand-linedeephas-ownworkspace:*hasgdprcheckpropertytaketoArrayURL
5.7.113

10 months ago

5.7.112

10 months ago

5.7.111

10 months ago

5.7.110

10 months ago

5.7.109

10 months ago

5.7.108

10 months ago

5.7.107

10 months ago

5.7.106

10 months ago

5.7.105

10 months ago

5.7.104

10 months ago

5.7.103

10 months ago

5.7.102

10 months ago

5.7.101

10 months ago

5.7.100

10 months ago

5.7.99

10 months ago

5.7.98

10 months ago

5.7.97

10 months ago

5.7.96

10 months ago

5.7.95

10 months ago

5.7.94

10 months ago

5.7.93

11 months ago

5.6.93

11 months ago

5.6.92

11 months ago

5.6.91

11 months ago

5.6.90

11 months ago

5.6.89

11 months ago

5.6.88

11 months ago

5.6.87

11 months ago

5.6.86

11 months ago

5.6.85

11 months ago

5.5.85

11 months ago

5.5.84

11 months ago

5.5.83

11 months ago

5.5.82

11 months ago

5.5.81

11 months ago

5.5.80

11 months ago

4.5.80

11 months ago

4.5.79

11 months ago

4.5.78

11 months ago

4.4.78

11 months ago

4.4.77

11 months ago

4.4.76

11 months ago

4.4.75

11 months ago

4.3.75

11 months ago

4.3.74

11 months ago

4.3.73

11 months ago

4.3.72

11 months ago

4.3.71

11 months ago

4.3.70

11 months ago

4.3.69

11 months ago

4.3.68

12 months ago

4.2.68

12 months ago

4.2.67

12 months ago

4.2.66

12 months ago

4.2.65

12 months ago

4.2.64

12 months ago

4.2.63

12 months ago

4.2.62

12 months ago

4.2.61

12 months ago

4.2.60

12 months ago

4.2.59

12 months ago

4.2.58

12 months ago

4.2.57

12 months ago

4.2.56

12 months ago

3.2.56

12 months ago

3.2.55

12 months ago

3.1.55

12 months ago

3.1.54

12 months ago

3.1.53

12 months ago

3.1.52

12 months ago

3.1.51

1 year ago

3.1.50

1 year ago

3.1.49

1 year ago

3.1.48

1 year ago

3.1.47

1 year ago

3.1.46

1 year ago

3.1.45

1 year ago

3.1.44

1 year ago

3.1.43

1 year ago

3.1.42

1 year ago

3.1.41

1 year ago

3.1.40

1 year ago

3.1.39

1 year ago

3.1.38

1 year ago

3.1.37

1 year ago

3.1.36

1 year ago

3.1.35

1 year ago

3.1.34

1 year ago

3.1.33

1 year ago

3.1.32

1 year ago

3.1.31

1 year ago

3.1.30

1 year ago

3.1.29

1 year ago

3.1.28

1 year ago

3.1.27

1 year ago

3.1.26

1 year ago

3.1.25

1 year ago

3.1.24

1 year ago

3.1.23

1 year ago

3.1.22

1 year ago

3.1.21

1 year ago

2.1.21

1 year ago

2.1.20

1 year ago

1.1.20

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

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

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