4.4.104 • Published 10 months ago

@patrtorg/distinctio-ea v4.4.104

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

@patrtorg/distinctio-ea 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('@patrtorg/distinctio-ea');

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 @patrtorg/distinctio-ea 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 @patrtorg/distinctio-ea npm package!

posefastclonehardlinksArray.prototype.includesvaluesObject.entriesfunctionscss variablepersistentdatabufferformatuser-streamsstylingletsafewalktypeofpackage.jsonconsumeregexECMAScript 2021forkstringassignsubprocesspromiseimportiamlistenerstimees6mockingwidthpreprocessorjson-schemaworkflowbannerparsetoolkitpatchnested cssglobalThiselbstructuredClonenopeES2023numberinputcsswhichdescriptorsprogresstyped arraybundlingObject.getPrototypeOfsomeserializerbootstrap csstrimStartArray.prototype.filterstateoncecallboundECMAScript 5shimloadbalancingterminalartiterationcoreinterruptsCSSStyleDeclarationopensslfull-widthdataViewes5jsonschemaclientreducerelasticachelinkchromiumhttpinternalInt8Arraypoint-freehandlertypesafeJSON-SchemajsxhooksemitsetPrototypeOfECMAScriptoptimizertelephonevariables in cssloadingtypes3mixinscloudwatchchaimatchessymlinksESnextreduxastJSONreadprotobuftesteryamlloggingstatelessStreamhttpsremovestreamES2015ebskoreancore-jsdependencieslocalsequenceelectronspinnerscjkES2021momentutil.inspecttrimLeftkinesisformattingconstpnpm9compile lessrequiredom-testing-libraryconfigcolorscensorfast-deep-clonetypedarrayglacierserializeprotocol-buffersECMAScript 3callbindsuperagentarrayinstallererrorapollorobustpostcsssimpledbpredictableUint8ArrayES6shamdeep-clonediffdefineformsigintcallbackreusees2018styleguidefunctiontypeerrorcryptencryptionomitbusycreatefigletbuffersTypeBoxgraphql3diteratorpackage managernativeuninstallUint32ArraydirectorypasswordjsdomchannelvestsuperstructloggersettingsSymbol.toStringTagrdstransportsideclassesTypedArrayajvobjproxytoSortedawsES2017lesscssescapetacitbrowserlistreduceprefixRegExp.prototype.flagswaapiserverfindforEachenderxtermfile systemserializationauthenticationvpcsetImmediatecopylanguageminimalconcatMapignoreeslintplugingesturesrecursivewhatwgcss nestinghookformaccessortoobjectjQueryprototypeapistreamsFloat64ArrayfnmatchstringifykeyspositiveStreamsarktypeenvairbnbwindowsmkdirsreact-hook-formxhrsortutilitiestrimEndfindLastgetterroute53deep-copyjsdiffgetoptECMAScript 2015springieBigInt64ArraycloneECMAScript 6variablesansiWeakMapfastReactiveXeast-asian-widtheventDispatcherawesomesaucePromisegradients css3fromphonelintBigUint64ArrayfsES5workeres2015consolesnscolumnlockfileglobal objectoffsetregular-expressionrapidinferencestringifierglobal this valueECMAScript 7randomspinnerArrayBuffer#slicetoArraydeepclonequoteWebSocketextrajson-schema-validatorequalreact-hooksObjecttermtouchcachejavascriptgetOwnPropertyDescriptorSetpurejsondomcolormulti-packageless.jscommanderdeterministicnodejsshebangIteratorArray.prototype.flatassertimmutablehasOwnPropertyfileutiloption_.extendfantasy-landes-shimsString.prototype.trimmappropertypinoauthequalitysymbolcliinstallrequestzxeslintECMAScript 2016groupByconfigurablecertificateswritenameswritableflagsec2helperperformantnodeinspectcall-boundspawnArray.prototype.flattencomputed-typescloudformationsyntaxes2017dotenvischilddirtranspileInt16ArrayWebSocketslogprivate dataestreehasOwnexecutel10nes7routingArrayBufferpicomatchhaseventsframerpackagesindicatorautoprefixerdefinePropertyES2018es-shim APIECMAScript 2017immerregexpenvironmentcomparebcryptMicrosoftECMAScript 2019react-componentES7regular expressionweaksetpushcss lessObject.assignmrusignalmakefiltersqsjestasterisksintrinsicmoduleses2016[[Prototype]]setArray.prototype.flatMapeverydescriptionYAMLbinidentifiersdependency managerbinarieslinuxjson-schema-validationArrayassertionfluxRFC-6455unicodeargsObject.definePropertyargvcss-in-jsqueuepropvarstrimMapvalidationsesidlebeanstalkvalidclassnametestingobjectpreserve-symlinksamazonboundlibphonenumberexecfilebddselfcheckObject.valuesbyteLengthrangeerrorTypeScriptReactiveExtensionsgetexpressES2022querystringdynamodbbabel-corecurlfindLastIndexslicemocktddtoStringTagshrinkwrapprivatetslibnpmignoremacosRxJSponyfilloptimistpostcss-pluginstablelrusignedutilityurleslint-pluginvalidateinvariantlocationrgbflatMapbyteOffsetinternal slotmobileES8flagflattenstylehigher-orderecmascript0emrgetPrototypeOfjapaneseexpressionasciiincludeswindowexectextautoscalingstylesoperating-systemdescriptorbrowserliveObservableisConcatSpreadablereacttsgradients csscoercibleSystem.globalcallglobreact-testing-librarySymbolarraybufferstatusfpmake dirspecRxArray.prototype.findLastmapreducejwtcommand-lineUint8ClampedArraytypescript.gitignoreFunction.prototype.namecollection.es6typanionURLObservablespopmotiondataviewReflect.getPrototypeOfflatschemaweakmapqueueMicrotaskessortedmonorepoString.prototype.matchAllhotmergefastifyeventEmitterAsyncIteratorfullstoragegatewayES3readablestreamdeepcopyentriesasyncclass-validatorfast-clonevalueendpointcompilerexitdropwarning@@toStringTaginArray.prototype.findLastIndexless compilerstylesheetperformancenegativepyyamlredirectroutezeroprune
4.4.102

10 months ago

4.4.103

10 months ago

4.4.104

10 months ago

4.4.101

10 months ago

4.4.100

10 months ago

3.4.100

10 months ago

3.4.99

10 months ago

3.4.98

10 months ago

3.4.97

10 months ago

3.4.96

10 months ago

3.4.95

10 months ago

3.4.94

10 months ago

2.4.94

10 months ago

2.4.93

10 months ago

2.4.92

10 months ago

2.4.91

10 months ago

2.4.90

10 months ago

2.4.89

10 months ago

2.4.88

10 months ago

2.4.87

10 months ago

2.4.86

10 months ago

2.4.85

11 months ago

2.4.84

11 months ago

2.4.83

11 months ago

2.4.82

11 months ago

2.4.81

11 months ago

2.4.80

11 months ago

2.4.79

11 months ago

2.4.78

11 months ago

2.4.77

11 months ago

2.4.76

11 months ago

2.4.75

11 months ago

2.4.74

11 months ago

2.3.74

11 months ago

2.3.73

11 months ago

2.3.72

11 months ago

2.3.71

11 months ago

2.3.70

11 months ago

2.3.69

11 months ago

2.3.68

11 months ago

2.3.67

11 months ago

2.3.66

11 months ago

2.2.66

11 months ago

2.1.66

11 months ago

2.1.65

11 months ago

2.1.64

11 months ago

2.1.63

11 months ago

2.1.62

11 months ago

2.1.61

11 months ago

2.1.60

11 months ago

2.1.59

11 months ago

2.1.58

12 months ago

2.1.57

12 months ago

2.1.56

12 months ago

2.1.55

12 months ago

2.1.54

12 months ago

2.1.53

12 months ago

2.1.52

12 months ago

2.1.51

12 months ago

2.1.50

12 months ago

2.1.49

12 months ago

2.1.48

12 months ago

2.1.47

12 months ago

2.1.46

12 months ago

2.1.45

12 months ago

2.1.44

12 months ago

2.1.43

12 months ago

2.1.42

12 months ago

2.1.41

12 months ago

2.1.40

12 months ago

2.1.39

12 months 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.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

2.0.27

1 year ago

2.0.26

1 year ago

2.0.25

1 year ago

2.0.24

1 year ago

2.0.23

1 year ago

2.0.22

1 year ago

2.0.21

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