5.7.113 • Published 2 years ago

@diotoborg/quas-esse v5.7.113

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years 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

2 years ago

5.7.112

2 years ago

5.7.111

2 years ago

5.7.110

2 years ago

5.7.109

2 years ago

5.7.108

2 years ago

5.7.107

2 years ago

5.7.106

2 years ago

5.7.105

2 years ago

5.7.104

2 years ago

5.7.103

2 years ago

5.7.102

2 years ago

5.7.101

2 years ago

5.7.100

2 years ago

5.7.99

2 years ago

5.7.98

2 years ago

5.7.97

2 years ago

5.7.96

2 years ago

5.7.95

2 years ago

5.7.94

2 years ago

5.7.93

2 years ago

5.6.93

2 years ago

5.6.92

2 years ago

5.6.91

2 years ago

5.6.90

2 years ago

5.6.89

2 years ago

5.6.88

2 years ago

5.6.87

2 years ago

5.6.86

2 years ago

5.6.85

2 years ago

5.5.85

2 years ago

5.5.84

2 years ago

5.5.83

2 years ago

5.5.82

2 years ago

5.5.81

2 years ago

5.5.80

2 years ago

4.5.80

2 years ago

4.5.79

2 years ago

4.5.78

2 years ago

4.4.78

2 years ago

4.4.77

2 years ago

4.4.76

2 years ago

4.4.75

2 years ago

4.3.75

2 years ago

4.3.74

2 years ago

4.3.73

2 years ago

4.3.72

2 years ago

4.3.71

2 years ago

4.3.70

2 years ago

4.3.69

2 years ago

4.3.68

2 years ago

4.2.68

2 years ago

4.2.67

2 years ago

4.2.66

2 years ago

4.2.65

2 years ago

4.2.64

2 years ago

4.2.63

2 years ago

4.2.62

2 years ago

4.2.61

2 years ago

4.2.60

2 years ago

4.2.59

2 years ago

4.2.58

2 years ago

4.2.57

2 years ago

4.2.56

2 years ago

3.2.56

2 years ago

3.2.55

2 years ago

3.1.55

2 years ago

3.1.54

2 years ago

3.1.53

2 years ago

3.1.52

2 years ago

3.1.51

2 years ago

3.1.50

2 years ago

3.1.49

2 years ago

3.1.48

2 years ago

3.1.47

2 years ago

3.1.46

2 years ago

3.1.45

2 years ago

3.1.44

2 years ago

3.1.43

2 years ago

3.1.42

2 years ago

3.1.41

2 years ago

3.1.40

2 years ago

3.1.39

2 years ago

3.1.38

2 years ago

3.1.37

2 years ago

3.1.36

2 years ago

3.1.35

2 years ago

3.1.34

2 years ago

3.1.33

2 years ago

3.1.32

2 years ago

3.1.31

2 years ago

3.1.30

2 years ago

3.1.29

2 years ago

3.1.28

2 years ago

3.1.27

2 years ago

3.1.26

2 years ago

3.1.25

2 years ago

3.1.24

2 years ago

3.1.23

2 years ago

3.1.22

2 years ago

3.1.21

2 years ago

2.1.21

2 years ago

2.1.20

2 years ago

1.1.20

2 years ago

1.1.19

2 years ago

1.1.18

2 years ago

1.1.17

2 years ago

1.1.16

2 years ago

1.1.15

2 years ago

1.1.14

2 years ago

1.1.13

2 years ago

1.1.12

2 years ago

1.1.11

2 years ago

1.1.10

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago