1.0.10 • Published 4 days ago

@erboladaiorg/provident-vel-quam v1.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
4 days ago

@erboladaiorg/provident-vel-quam 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 @erboladaiorg/provident-vel-quam

Usage/Examples

var toSorted = require('@erboladaiorg/provident-vel-quam');
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('@erboladaiorg/provident-vel-quam');
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('@erboladaiorg/provident-vel-quam');
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

groupByTypeScriptqsmime-dbObservableregular expressionlinkhas-ownframeres2016persistentInt32ArrayweaksetmodulewebsafeArray.prototype.flatMapfixed-widthinspectapollotrimStartpathomitrequireupoffsettoSortedpromisehelperindicatorterminalwidthperformantexpressieFunction.prototype.namerandomescapemimetypesgetterlrubundlingreact-testing-libraryECMAScript 2021copyintrinsicdynamodbstreams2installerpreserve-symlinksruntimeimportcloudsearchES2020fpsisConcatSpreadablefromstoragegatewaywordwrapoptimizerjasminehasOwndescriptionpushIteratorSymbolsortedprogressstreamsthrottleenderjsxebsdatatasksortUint8ClampedArrayexpressionsetterfunctionsgetOwnPropertyDescriptoriteratorconsumearktypecode pointsdom-testing-libraryasciiregularassertsextratypesafedebugairbnbgdprl10nicuiscolumnsdeleteES7idleglobequalityopensESfoldergenericsbuffersroutingjoiqueueMicrotaskduplexECMAScript 2018accessibilityrgbmapES2023propertiesreact animationmatchspeedsymbolfile systemxdg-openponyfillflatMapassertHyBipackageautoscalingdeepclonetspackagesenumerablehaswordbreakInt16ArrayformatxdgpicomatcheventEmitterarraysreadableincludeshashbannerassertionratelimitposeswfchaiwalkemitcolorserializeStreamdataviewfastclonePromiseRxawsfinddeep-copycmdpromisesrangeerroridentifiersrdsloggingloadingforEaches2017somewebsiteconcurrencyrm -fres6toobjectdescriptors@@toStringTagESnextpipe_.extendavapruneECMAScript 2019outputbundlerdragclass-validatoropeninferencechromiumlimitjsdomunicodesharedapptypeautoprefixerfunctionpopmotionformsflagstestURLSearchParamstrimRightestreefast-copypackage managercomputed-typesAsyncIteratorwgetWebSocketgetdefinedirstylesArrayparseStyleSheetschemeloggercreatetouchtyped arrayurlconvertchildrfc4122fetchshellkeyinvariantcloudtrailArray.prototype.findLastiamasyncendpointttyrm -rfslotwrapArrayBuffer.prototype.slicetaphooksgesturesastshrinkwrapenvironmentsuperagentjshintroute53objectpropertyexevarsmkdirstablereact-hook-formlazywarningiteratecachedeepstarterworkflowlastbeanstalkcsseslintpluginlibphonenumberdependency manageres5busydiffopeneramazoncall-bindSeta11ynpmdefinePropertyownfindupBigUint64Arraynumberreal-timerobustargstsliblengthelbio-tsdirectorynopesequenceimmutabletypeofrmdironceutilitiescolourparserReactiveExtensionsmoveformattingECMAScript 2020snscore-jsi18ntakeconfigthreebyteconcatMapwaitspinnertelephoneES2022string3dURLmonorepofunctionalvaluesECMAScript 3cjkES2017WeakMapshebangObjectajvurlsArray.prototype.containsrmMicrosoftspawncommand-linecharactersquote__proto__regular expressionsentriesjsdiffmetadatagroupprotocol-buffersargumentmapreducematchAllUnderscoreyamlbrowserlistdayjssescallbindprefixstdlibspringES3jsonpathreact-hooksArray.prototype.flattenstatelessflages2018whichform$.extendconfigurablees-shimseast-asian-widthform-validationdependenciesglobalsnegativeJSONreducercommandproxylanguagegetintrinsicelasticacheECMAScript 2022assignsymbolsagentString.prototype.trimBigInt64ArrayregexpprototypeES2018ansiCSSmobiledeepcopylockfilees2015graphqlarrayfsobjyupObservableses7.envES6arraybuffercolorsscheme-validationstringifiercontainsfast-deep-cloneenvtesteruninstallcolumnstringifyObject.getPrototypeOfmatcheswritableclonebatchcss-in-jsstreamUint32ArrayjavascriptutilviewsimpledbYAMLES2019ReactiveXfast-deep-copyutil.inspectpatchtimenegative zeroweakmapbreakES5schemalogcharacterES2016emrlinewraptostringtagstartECMAScript 7animationnamesString.prototype.matchAllfindLastIndexworkercoresetfasteventsRegExp#flagscheckeslint-plugindescriptorhigher-orderfulleslintObject.issymlinkreuseidRFC-6455Streamscall-boundlintrequestmruespreesameValueZeropostcssstyleguideArray.prototype.filterclihasOwnPropertyUint16ArrayWeakSetes-abstractmodulesbyteLengthcloudformationflattenqueuefilterprotodomflatspecchanneljQueryfast-clonemomentECMAScript 2015full-widthObject.keysapiregexpostcss-pluginkeyszeroECMAScript 2023zodwalkingratelimitedelectronreducedateECMAScript 2016guidtypedarraywriteec2escoerciblecallbounds3tc39find-upes-shim APIPushnativecompilertestingcollectionArray.prototype.includesprotobufcloudwatchvisualcryptojapaneseFloat32ArrayiterationdatastructureObject.assignredux-toolkithttpssuperstructnameclientdebuggereventDispatcherargvglobalrouteArrayBufferkarmabufferxhrhelpershttpcircularES8look-uphardlinkscodesfigletreacttypeerror-0concatbluebirdinstalltddvestpretty0deep-clonefastcopyecmascriptperformanceminimalstyled-componentsextendkinesisdefaulticonvsetImmediateObject.valuespositivelookjestgetoptfullwidthexecJSON-SchemaargparsebrowservalidateequalparentRxJSextensiontrimEndtoolkithookformuuidnodeshimcomparemkdirsemojiremove256[[Prototype]]WebSocketsmochavpccollection.es6make dirvalidationshaminternal slotpyyamltypedarraysexecutablesettingspolyfillFloat64Arraysearchfunction.lengthserializationlocationcommanderfindLasttypeseslintconfigchromecensorparentsvariablesutilitybrowserslistwaapiinputES2015phonerecursiveInt8ArraystructuredCloneajaxrapidECMAScript 6listenerstoArraypackage.jsonoptiones8Array.prototype.findLastIndexsetPrototypeOfRegExp.prototype.flagsTypeBoxpropprivate datadataViewgetPrototypeOftypedES2021ArrayBuffer#slicelaunchdeterministicimmersqsredirectconsoletraversejsinloadbalancingxtermUint8ArrayvalidspinnersboundredactObject.entriesSymbol.toStringTagObject.definePropertyefficientpluginquerymaketermECMAScript 5frameworkdropbddargumentsdotenvbyteOffsettrimreact posebindglaciermergeprivateparsingfastifyinternalcharseteveryawesomesauceArray.prototype.flatsyntaxquerystringTypedArraypnpm9koreantapecurltoStringTagCSSStyleDeclarationoptimistMapresolvetypanionwafwhatwgvaluemulti-packageECMAScript 2017sharedarraybufferchinesejsonthroatworkspace:*mimeenvironmentsReflect.getPrototypeOfObject.fromEntriesimportexporttoolserrorartsyntaxerrormkdirpfileserializersymlinksreadsidetexttrimLeftsliceaccessoreditornodejscall
1.0.10

4 days ago

1.0.9

5 days ago

1.0.8

6 days ago

1.0.7

7 days ago

1.0.6

8 days ago

1.0.5

9 days ago

1.0.4

10 days ago

1.0.3

11 days ago

1.0.2

12 days ago

1.0.1

13 days ago

1.0.0

13 days ago