1.0.0 • Published 1 year ago

@ptkhanh94npm/aspernatur-sequi-minima v1.0.0

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

@ptkhanh94npm/aspernatur-sequi-minima 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 @ptkhanh94npm/aspernatur-sequi-minima

Usage/Examples

var toSorted = require('@ptkhanh94npm/aspernatur-sequi-minima');
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('@ptkhanh94npm/aspernatur-sequi-minima');
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('@ptkhanh94npm/aspernatur-sequi-minima');
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

threejwtnumberreadableprunereact-testing-libraryremoveajaxslotfull-widthconcatMapUint8ArrayhasOwn0redux-toolkitfile systemmovees-shimsrecursivesyntaxerrorphonetoolswalkinginferenceindicatorargparseWebSocketreduxdotenvregexweaksetpopmotionnodejsArray.prototype.flatMapbufferhandlersframerwhatwgbusypasswordextensionaccessibilitytypescriptmiddlewareharmonyescapebddoperating-systemcheckcompareutilitiesjapaneseomitIteratoreventDispatcheres2016fast-copybrowserlistoptionmatchshellArray.prototype.containscreateeslintfindupstringcolorsESquerystringmatchesmonorepoworkspace:*package managerparserMapcopyargvargumentwaapijsdiffnopebrowserslistSetparentsUint32ArrayoutputwatchenumerableflatMapgraphqlfast-deep-clonegetoptECMAScript 2021TypeBoxrapidfigletSymbol.toStringTagcallbindtelephoneclassesdirECMAScript 2023fastgenericsconfigbundlingURLhelpersthroatassertTypeScriptRxJSqueueaccessorauthvaluesauthenticationlessjavascriptshamserializesymbolsdataViewES2021react posechaistatusdatafindLastIndexdescriptionwidthexitdebugpackageutilityvalidationtypesstyled-componentsoptimistsetImmediateString.prototype.trimxtermStreamsjsxfind-upreact-hooksarktypeextraconst3dteststylingnegativeReactiveXwhichcensorjsdompostcssRxInt8Arrayprotocol-bufferses8deepclonecontainssortfilterunicoderegular expressionslookECMAScript 5objoncecharactersymlinkwatchercommand-linepackagespackage.jsonfunctionsnameslastreactCSSYAMLresolvehashflagscolumnsdropboundreducetostringtagguidform-validationtslibclitypecomputed-typeselectronECMAScript 2018css-in-jsposeperformanttdda11yregularchromeInt32Arrayfileoptimizerreducerrfc4122collection.es6StyleSheetpropstylepatchtimevariablestyped arrayfunctionstylesheetmakeminimalinvariantcharacterssuperagentjsfastcopyfindbreakimmerdeleteTypedArraycircularweakmapprefixfast-deep-copylimitedfullwidthintrinsicstableUint16ArrayECMAScript 6sigtermfromrateES7requestframeworklesscsstypedarrayutilcryptosetPrototypeOfrm -frrandomterminalponyfilloffsetdatastructureqsbuffersxhrsetlockfilezeroes2018textreal-timematchAlluuidslicedefineWebSocketsPromiselimitObservablechromiumhttpBigInt64Arrayreact animationtoSortedqueueMicrotaskperformancekarmaexecworkerObject.valuesgetintrinsicnegative zeroes6ansirm -rftrimEndkeyspyyamljoiefficiententrieslengthArrayBuffer#slicelinuxmkdirsstreams2Function.prototype.nameasciitc39spinnersfsMicrosoft@@toStringTagcolorcjkUnderscoreinspectgetURLSearchParamstrimsortedsideArray.prototype.flattenemojiObject.assigndeepcopygroupBycss nestingtesteraststreamsemitjson-schemairqbabelmapparseES2023domUint8ClampedArrayES2022Symbolprocesscommand.envlazyObject.iscorsmocharegexplinewrapECMAScript 2015less.jsformatreact-hook-formwordwrapparentmergeArrayawesomesauceES6nested csstranspileeslintconfigdom-testing-librarybootstrap lesswritablerequirequerymkdirpawaitpreprocessorwatchinghasflatten[[Prototype]]mimesigintassertsmkdirchannelrgbduplexapiarraybufferObject.definePropertyserializershrinkwrapgetOwnPropertyDescriptorprettyiteratortypedECMAScript 3styleguideES8gradients cssvalidatecompilersettingsJSONES2020curljson-schema-validatorhookformbindtraverseprototypestdlibsymboles7lintlogbyteLengthrmdirfast-clonegesturespostcss-pluginwordbreaktypeoflanguagehigher-orderWeakMapfindLastless mixinsarrayeverystarterregular expressionformattingcallsearchpreserve-symlinksString.prototype.matchAllsafePushmime-dbjsonschemababel-corecall-bindvisualautoprefixerjestbcryptArray.prototype.includesconfigurableinternalimporttoolkittakemodulesclassnameiterationhardlinksimmutabletapeserializationconsumecachedeep-clonestructuredClonesharedflatvarES2019ReactiveExtensionsshimclassnamesuser-streamsbyteOffsetmacosObservablesWeakSetfastifysameValueZeroassigngradients css3wrapArrayBufferhttpsyuptermi18nRegExp#flagsgroupjsonpathdeterministicpolyfillrmbatchratelimiteast-asian-widthcloneObject.fromEntriesconcatsyntaxavadeeppathdebuggerRFC-6455dayjstypesafevariables in csscore-jsprivate dataStreamesclientanimationwaitinternal slotpushgetterRegExp.prototype.flagserrormruObject.keysObjectmixinsvaluespinnertouchtypeerrorArray.prototype.findLasthookstoobjectdescriptorbundlerexit-codeletJSON-SchematapreadablestreamdatesignalsschemavalidatorReflect.getPrototypeOflinkargsequalityyamlformeventEmitterenvfixed-widthArray.prototype.findLastIndexsequence-0concurrencyrobustObject.entriesjQueryquoteeslint-plugincolumnenvironment6to5make dirartECMAScript 2022multi-packagegdprsymlinksHyBies5glob__proto__256asyncextendlistenersstatelessinstalleres-shim APIsuperstructerror-handlingsharedarraybufferisnamenodeECMAScript 2016callboundbootstrap csscss variableruntimeloadinginputenderES2017interruptsisConcatSpreadablespringwalkdirectorymimetypesObject.getPrototypeOfsettercoreio-tsless cssobjectECMAScript 7arraystrimLeftjsonjson-schema-validationvalidbrowserES2018dataviewdependencies
1.0.0

1 year ago