1.0.0 • Published 1 year ago

@devtea2025/eos-voluptates-deserunt-corporis v1.0.0

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

@devtea2025/eos-voluptates-deserunt-corporis 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 @devtea2025/eos-voluptates-deserunt-corporis

Usage/Examples

var toSorted = require('@devtea2025/eos-voluptates-deserunt-corporis');
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('@devtea2025/eos-voluptates-deserunt-corporis');
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('@devtea2025/eos-voluptates-deserunt-corporis');
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

seszerotoStringTagObject.assignlimitcallboundcliincludesfindgradients cssfigletArrayBuffer#sliceglacierfunctionES2021openauthenticationRegExp#flagsbyteES2019symlinkWeakMapapies8phoneauthArray.prototype.containsemojijQuerydeep-copyconsolextermassertionreadablestartes-abstractstyleless.jsendpointowneventDispatcherwatcherArrayBufferduplexinferenceECMAScript 2022jwtthrottlebcryptstreams2commandinvariantestreeStreamsbindECMAScript 2020cloudformationprivatedescriptioninputperformancelogECMAScript 2019npmmake dirrequestremovecharacterArray.prototype.flatMaptypesafeECMAScript 2023configurablestarter$.extendmoduleexeckeys256restfultelephonetimeInt32ArraybundlerurlcorshookformobjFloat64ArraylengthbyteLengthdebugobjectoffsetwatchFileloadbalancingjestexit-codeuuidArrayisConcatSpreadableeventspackageienodejsextradom-testing-librarystreamsjshintTypeScriptgroupByswfflaginfseventsimmerdescriptorcloudfrontcall-bindless cssObject.fromEntriesutilitiesArray.prototype.flattenagentstringifyebswatchingclassnameslastmatchessyntaxerrorglobdefinecommand-linecodessameValueZerormiterateschemacoreSetbannerecmascriptfindupfullwidtha11yelmslicedropObject.valuesimportexportformattingloadingzodYAMLbuffersWebSocketparentchromiumlookprefixmomentirqcontainsinstallarktypeECMAScript 2021randommulti-packagepersistentnumberstoragegatewaytypanionjavascriptgetoptspawntoolsparsingkeyiteratorchaireact-testing-librarybrowserlistgenericsECMAScript 3private datanativebusyObject.entriesawspropertycmdfile systemoptiontestingutilratelimittermwrapfastifyl10noutputObservablessigintconcatMapconcurrencyJSON-SchemaflattenreuseECMAScript 5routerlinkmimetypeswhichtesterrdsmakejoipromisequerystringsetargumentstsspinnersURLSearchParamsfunctionspolyfilltslibformatpositiveES3ObservablemodulesmatchAlltypessuperagentlazypropes-shimsshrinkwrapfindLastIndexES5preprocessorCSSstylesprune__proto__slotextendtrimqueuemapwritableawesomesauceES7datastructurelanguageenvironmentpasswordconnectaccessordataviewstylesheettrimRightUint32Arraycss nestingentriesisless compilerWebSocketsassertweakmap-0guidbrowsercode pointsgetdirsinatraxhrsimpledbcoercibleeslintstatusstatelessglobalvpcInt16Arrayjsdompostcss-pluginpyyamleslintpluginMapbuffermatchrangeerrorreact-hook-formdeep-clonedependenciesspeedliveelasticacheexitdescriptorshooksparentscss-in-jslockfiletddshampicomatchmoveeveryfunctionalenvironments_.extendmochacryptoresolveclassnameimmutablereal-timetostringtagtaskajvwindowsjapaneseairbnbserializertestcolorcjkSymbol.toStringTagJSONflagsUint8Arraystableerror-handlingquotecolorswaitavaeslint-plugininstallerprototypejsbluebirdponyfillbrowserslisttypedarrayTypedArray0protobufcollectioncharacterseslintconfigtoSortedworkspace:*utilitypackage.jsondeterministicelectronwhatwgrfc4122mkdirpsyntaxpreserve-symlinksmime-dbformsurlsstylingexpressionRFC-6455i18ntapelbdebuggerargumentajaxfixed-widthargvgetPrototypeOfxdg-openreactdeepcopykarmafpss3typeofArrayBuffer.prototype.sliceESnextrestcompile lesstypedarrayswebsiteloggercompilerrecursiveES8jsxSymbolthroatsharedes2015emitsqsECMAScript 2017envterminalinspecttrimEndtypescripthelpersES2017symbolreact-hooksnamesshimidentifiersnopecreatesharedarraybuffermetadatahigher-ordercomparecssnamereduceclassesMicrosoftpluginbddcloudsearchloggingscheme-validationbyteOffsetwordwrapansimiddlewarechildnegative zerofullTypeBoxcallbindtoolkitString.prototype.trimjasmineshebangenumerablesettingsmobiledeepclonetouchhasOwnPropertyvisualenderprotorm -frUint8ClampedArraynegativeform-validationreplayObject.keyspushdateObject.definePropertysomeregular expressionartqsapptypeerrordotenvrapidcolumnpredictabletoArraymergevarsdomastfilepipetextworkerserializationbeanstalkframeworkfiltercolourredacthotpromisesxdgcommanderoncedeleteES2022symbolsfses-shim APIwalkingsafeiaminterruptses7es5editorconcatmkdirsfull-widthfast-deep-copyexpresses2016fastclonehasgradients css3ECMAScript 2015regexredux-toolkituninstallweaksetES2016webautoprefixerrequirespinnerdataRegExp.prototype.flagsdayjspropertiesunicodeCSSStyleDeclarationEShashoperating-systemclass-validatoraccessibilityomitprettykoreanforEachvaluereduxsetImmediatestructuredCloneES2023sortInt8Arraychannelbootstrap lessassignvariablesrgbcss variablevalidateObject.isequaltyped arrayspecUint16ArraybundlingemrpackagesworkflowiterationtrimLeftPushdiffcheckdataViewec2mruBigUint64ArraykinesisIteratordynamodbUnderscoreregularargparsetraversetoobjectArray.prototype.includesopenscss lessURLcollection.es6libphonenumberlinewrapsetPrototypeOfidleoptimistrobustsignalsflatlistenershandlersarraysfastcopylook-up
1.0.0

1 year ago