1.0.0 • Published 1 year ago

@ptkhanh94npm/nostrum-et-laborum v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@ptkhanh94npm/nostrum-et-laborum Version Badge

github actions coverage License Downloads

npm badge

ES proposal spec-compliant shim for Promise.withResolvers. Invoke its "shim" method to shim Promise.withResolvers 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 withResolvers = require('@ptkhanh94npm/nostrum-et-laborum');

var obj = withResolvers(Promise);
assert.equal(obj.promise instanceof Promise, true);
assert.equal(typeof obj.resolve, 'function');
assert.equal(typeof obj.reject, 'function');

withResolvers.shim(); // will be a no-op if not needed

var obj2 = Promise.withResolvers();

assert.equal(obj2.promise instanceof Promise, true);
assert.equal(typeof obj2.resolve, 'function');
assert.equal(typeof obj2.reject, 'function');

Tests

Simply clone the repo, npm install, and run npm test

lockfilebrowserwalkingtaskcloudfronttypesafeapollodataViewtestingoutputhookformreadablestreamperformantwaitCSSStyleDeclarationArray.prototype.flatMapviewapiMapchaiprotottycalltostringtaggetPrototypeOfUint8ClampedArrayenvimmutablevalueponyfillESnextdeep-copyObject.entriesexpressionenvironmentES6regularspinnersvarslengthsetterautoscalingHyBiarrayrateString.prototype.trimtimefast-copyfastclonefseventsECMAScript 2023fetchECMAScript 6Array.prototype.includesBigUint64Arraystreampnpm9clistdlibtypedUint8Arraysequencefast-deep-copyURLtypetraverseeverystarterframeworkdependenciesdescriptiondefinepropertyfunctionscreatedotenvconcatMapjsconcurrencycharacterconsoleeast-asian-widthobjectfile systemObject.definePropertycolumnES2023bundlingsharedqueueMicrotaskwordbreakvariablesfindupflattenprogressqueryless mixinsspectyped arrayvestendpointutilbddidleFunction.prototype.namecall-bindArray.prototype.flates2015matchAlloptimistscheme-validationenumerablehttpsassertionformstslibio-tsoptimizerdeepcopycommanderformatpipepersistentrapidshrinkwrap256picomatchasciiPushArrayBuffer#slicergbstructuredClonetrimLeftECMAScript 2020shamequalitytriminstallerredactupawaitpluginWebSocketscomputed-typesArray.prototype.flattenswfpolyfillString.prototype.matchAllsymlinkextraimmerlogiamfullthrottleglobnativeargparsejestregular expressionsmochanodeexeczeroratelimitmulti-packageefficientauthSethasawesomesauceglaciersinatrastoragegatewayrm -frfseslintconfigfixed-widthwatchincludeswarningrandomUnderscoretelephonedatastructurereduxgetOwnPropertyDescriptorwindowsmoveFloat64ArraystatelessstreamsECMAScript 3uninstallquoteregexptapeURLSearchParamsimportexporta11yinterruptshotkoreantestbindreadableprivatemetadataterminternalconnectnegative zerotypedarraycallbindcommandInt8ArraycrypttypeofYAMLjasmineECMAScript 2018workerUint32ArrayopentrimStartmkdirthroatvalidRxJSES5oncetypedarrayseslint-pluginoptionjsonpathsafeslotextendcryptoAsyncIteratorsqsArray.prototype.findLaststringifierprefixmacosnumberpredictableinternal slotcallbackdayjsgetintrinsicyupieinferenceReactiveXbeanstalkstyleslook-upbannergradients cssfast-deep-cloneajaxArrayclass-validatordropECMAScript 2015loggingcss-in-jsloadbalancingparsingless compilernodejscloneimportmobilereact-hook-formArrayBuffer.prototype.sliceserializationstablefilecopyrfc4122emojicodesdeep-cloneMicrosofthardlinkswhichbatchsetImmediatefunctionlinkencryptionremovehigher-ordersearchinnamesestreedirectoryformtouchcssargvWeakMapbreakgraphqlcurlentriesintrinsictoolssymlinksbyteOffsetbluebirddynamodbmodulewatcherarktypeclassnamesqueuecollection.es6forEachdescriptoremitfull-widthwordwrapcore-jspropresolveelmcontainsinstallmake dirdebugkinesisArrayBuffersignalsrdsdeleteansieventsform-validationjsdomstatuscss lessconsumelistenersagentvaluesprettyjshintroutereventEmitterreducerboundmonorepoenderSymbol.toStringTagsortutilitiessetPrototypeOfes6hashlimiteddataviewdeterministicES2021.envutilityrangeerrordependency manageres7ES2020isConcatSpreadablemrucall-boundstringgroupjsxlesscssjoipatchECMAScript 2016Array.prototype.findLastIndexES3someschemagetoptweaksetjsonindicatorECMAScript 2019mimetypeerror
1.0.0

1 year ago