5.8.84 • Published 10 months ago

@taktikorg/tempore-a v5.8.84

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

@taktikorg/tempore-a Version Badge

dependency status dev dependency status License Downloads

npm badge

An ESnext spec-compliant Array.prototype.toSorted shim/polyfill/replacement that works as far down as ES3.

This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the proposed spec.

Because Array.prototype.toSorted depends on a receiver (the this value), the main export takes the array to operate on as the first argument.

Getting started

npm install --save @taktikorg/tempore-a

Usage/Examples

var toSorted = require('@taktikorg/tempore-a');
var assert = require('assert');

var input = [5, 4, 3, 2, 1, 0];

var output = toSorted(input);

assert.deepEqual(output, [0, 1, 2, 3, 4, 5]);
assert.notEqual(output, input);
assert.deepEqual(input, [5, 4, 3, 2, 1, 0]);
var toSorted = require('@taktikorg/tempore-a');
var assert = require('assert');
/* when Array#toSorted is not present */
delete Array.prototype.toSorted;
var shimmed = toSorted.shim();

assert.equal(shimmed, toSorted.getPolyfill());
assert.deepEqual(input.toSorted(), toSorted(input));
var toSorted = require('@taktikorg/tempore-a');
var assert = require('assert');
/* when Array#toSorted is present */
var shimmed = toSorted.shim();

assert.equal(shimmed, Array.prototype.toSorted);
assert.deepEqual(input.toSorted(), toSorted(input));

Tests

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

mixinsfast-deep-clonequeueMicrotaskagentvestStyleSheetshebangFloat64Arraytsdeepbrowsercall-boundhardlinkshelpersCSS.gitignorecjkes2016classnamesURLerror-handlingcommandpromisecallwaitparseiteratevalidatorbundlingbuffertranspilerformattingloadingquerystringindicatornpmignorejavascriptmatchAllSymbol.toStringTagstyled-componentsclassesclientes-shimsprettyescaperuntimeECMAScript 2019locationsymbola11yespreeenderArrayfetchserializerES2022definelockfileequaloptimistgetOwnPropertyDescriptorelasticacheArray.prototype.flattenfile systemObjectconsumevarsmulti-packagei18narraysrgbcommand-lineshampurearraycertificatesstringconsoleSymbolastcompile lessmockingprotocol-buffersObservableregular expressionquoteimmerautoscalingUint8Arrayhas-ownFloat32ArrayieeventDispatcherless mixinsreact-hooksenvironmentestreepackage managereslintplugininstallclass-validatorECMAScript 2020callbackparserobjectworkflowtesterInt32Array__proto__utilshandlersECMAScript 7trimEndArray.prototype.flatMapcomputed-typesesdatastructureaccessibilitytelephone.envObservableses8browserslistString.prototype.matchAllstreamprivatemodulesmetadatafileES2021globalThisjsonfunctionspropertyhooksjsxjwtRxtslibnested cssownmapreduceresolvefast-deep-copyeslint-pluginmacosECMAScript 2017chineseserverbytebusydescriptorECMAScriptframerSystem.globalslicegetshellHyBies7Object.entriesenvlazylesscharactertypesafejshintelmyupcss variablelrufpssharedarraybufferprocesstranspilecontainscallbindletregexObject.getPrototypeOfstringifyroutingauthschemeSeteverywaapikinesisregularsignalajvimporttouchtrimStarttrimLeftsubprocessgroupdefinePropertymanagerpropertiescreatebyteLengthremoveutilitiesgenericshigher-ordermockcall-bindecmascriptsortedcloudfrontshrinkwrapdiffoffsetphoneharmonycurltypescriptworkervalidtostringtag@@toStringTagES2020regexpsimpledbnumberonceless compilerautoprefixerjson-schema-validationpersistentmkdires5extratypeeast-asian-widthbinariesfastifygetoptsortvisualartsafetestingconfigurabletypeerrorrequestxhrpushreact posesyntaxprogressloggermkdirsmobilecsssettingsbabeltypeofprototypewarningreact animationjestgitignoreiamflagsobjsymlinksdescriptionprunearktypecloudwatchawesomesauceassertsstringifiernamesvaluesdependencies_.extendpostcsssessetImmediatecolourwhichcacheexpressasciideep-cloneglobES5deepcopytc39bindhandlerbcryptprivate datagetPrototypeOfstylesheetPushjson-schemaArray.prototype.filtertypedarraymatchlengthhotelbexitwidthwritableeslintes2018queryES2016unicodekeysintrinsicprefixperformantTypedArrayRegExp.prototype.flagstypanionvariables in cssomites-shim APItoSortedmonorepofast-clonegetintrinsicfunctionsameValueZeroflatpopmotionzerostylingeventspicomatchboundconfigreadablemapmake dircircularpnpm9json-schema-validatorequalitypipepreserve-symlinkseffect-tsfnmatchincludesstreamsmoverangeerrorES8concatMapperformanceemrdeterministicexit-codehelperReactiveXjapanese3dstatelesscompareopenssles6deep-copytrimgdprarraybufferl10nreal-timesigintpasswordpredictablehasOwnPropertysqsfluxsignedReactiveExtensionsObject.assignECMAScript 5WeakSetcensorpolyfilldependency managerObject.valuesglobal objectInt8ArrayECMAScript 2022assignsuperstructfull-widthutilroute53qsRegExp#flagsreadablestreamArray.prototype.findLastgradients css3windowisConcatSpreadableaccessorconstmodulestylesES2018immutableconcatdataviewlastreadtestjsObject.definePropertycloudsearchregular-expressionprotoredactidlevpccodesdatereact-hook-formtypedarraysliveBigUint64ArrayselfcryptCSSStyleDeclarationzoddescriptorspyyamliterationrdsurlgroupBydirrobustnodeUnderscorehasmergelistenerscliES2023spinnerfastclonerouteexpressionhttpcolorsirqajaxwindowscore-jslintnpmhashrandomstylextermbabel-coreReflect.getPrototypeOferrorhasOwncloudformationfpjQuerysymbolses-abstractelectrontimemkdirpdotenvfindLastpathString.prototype.trimweakmapUint16ArrayinvariantMapJSONio-tsinputsidejoiswfutil.inspectObject.fromEntriesserviceWebSocketArrayBufferchromiumpackage.jsonbootstrap cssposeWeakMapglobalsdataViewbddfindspeednodejszxinterruptsimportexportECMAScript 6Iteratorfullwidthglobal this valuecollectionkoreangraphqloptionacornstable$.extendnegativeURLSearchParamsvalidationspawneventEmitterargumentArray.prototype.containsfast-copycolumncallboundcss-in-jskeybuffersschemapackagesES6jsdifftoolkitrulesponyfillfilterworkspace:*toobjectlesscssbrowserlistcloneInt16Arrayemitfront-endcss nestingmakeWebSocketshttpsmatchesauthenticationform-validationsnsidentifierses2015installerpropwgetback-endslotapiassertStreamsdayjsvariablesfunction.lengthlinkansiUint32ArrayairbnbqueueMicrosoftdynamodbvalidateapolloforEachfromECMAScript 2018collection.es6compilerscheme-validationefficient0iteratorcloudtrailflatMapRFC-6455internalpositiveexecfileES7symlinkfindLastIndexrequirepino256sequenceasyncoptimizerArray.prototype.flatsetPrototypeOfflagbincopyfastinferencelibphonenumbertrimRightthreetoStringTagexecanimationasteriskstextpatcheslintconfigoutputcoercibleutilitycoretoolsvalueforkcolortermnegative zerodragclassnameinternal slotargvbyteOffsetfulldirectoryassertionnativesignalsserialize[[Prototype]]Function.prototype.nameramdacolumnsArray.prototype.findLastIndexvarmomentttyargstyped arraydom-testing-librarytacitreuseformsebsjsonschema6to5formPromisestructuredCloneBigInt64ArrayspecESgradients cssstoragegatewayredux-toolkitESnextcryptogetterArrayBuffer#slicelanguageamazondatalocalECMAScript 2021tddinspectloadbalancingpreprocessorfixed-widthviewECMAScript 2016replayES2017environmentsJSON-SchemachromeArrayBuffer.prototype.sliceignoresomeECMAScript 2023bootstrap lessspringminimalbinaryyamlcheckfastcopyObject.keystypedec2terminalrecursivedeepclonestatuscurriedes2017fsproxyES3s3ECMAScript 3commanderexecutechaiuploadStreamtraverseisencryptionshimnopeprotobuf
5.8.84

10 months ago

5.8.83

10 months ago

5.8.82

10 months ago

5.8.81

10 months ago

5.8.80

10 months ago

5.8.79

10 months ago

5.8.78

10 months ago

5.8.77

10 months ago

5.8.76

10 months ago

5.8.75

10 months ago

5.8.74

10 months ago

5.7.74

11 months ago

5.7.73

11 months ago

4.7.73

11 months ago

4.7.72

11 months ago

4.7.71

11 months ago

4.7.70

11 months ago

4.7.69

11 months ago

4.7.68

11 months ago

4.7.67

11 months ago

4.7.66

11 months ago

4.7.65

11 months ago

4.7.64

11 months ago

4.7.63

11 months ago

4.7.62

11 months ago

4.7.61

11 months ago

4.6.61

11 months ago

4.6.60

11 months ago

4.6.59

11 months ago

4.6.58

11 months ago

4.6.57

11 months ago

4.6.56

11 months ago

4.6.55

11 months ago

4.5.55

11 months ago

4.5.54

11 months ago

4.5.53

11 months ago

4.4.53

11 months ago

4.4.52

11 months ago

4.4.51

11 months ago

4.4.50

11 months ago

4.4.49

11 months ago

4.4.48

12 months ago

4.4.47

12 months ago

4.4.46

12 months ago

4.4.45

12 months ago

4.4.44

12 months ago

4.3.44

12 months ago

4.3.43

12 months ago

4.3.42

12 months ago

4.3.41

12 months ago

4.3.40

12 months ago

3.3.40

12 months ago

3.3.39

12 months ago

3.3.38

12 months ago

3.3.37

12 months ago

3.3.36

12 months ago

3.3.35

12 months ago

3.3.34

12 months ago

3.3.33

12 months ago

3.3.32

12 months ago

3.3.31

12 months ago

3.3.30

1 year ago

3.3.29

1 year ago

3.3.28

1 year ago

3.3.27

1 year ago

3.3.26

1 year ago

3.3.25

1 year ago

3.3.24

1 year ago

3.3.23

1 year ago

3.3.22

1 year ago

3.3.21

1 year ago

3.3.20

1 year ago

3.3.19

1 year ago

3.3.18

1 year ago

3.3.17

1 year ago

3.3.16

1 year ago

3.2.16

1 year ago

3.2.15

1 year ago

3.1.15

1 year ago

3.1.14

1 year ago

3.1.13

1 year ago

3.1.12

1 year ago

3.1.11

1 year ago

3.1.10

1 year ago

3.1.9

1 year ago

3.1.8

1 year ago

3.0.8

1 year ago

3.0.7

1 year ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.3

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