1.0.0 • Published 1 year ago

@bobyzgirlllnpm/a-illum-itaque v1.0.0

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

@bobyzgirlllnpm/a-illum-itaque 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 @bobyzgirlllnpm/a-illum-itaque

Usage/Examples

var toSorted = require('@bobyzgirlllnpm/a-illum-itaque');
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('@bobyzgirlllnpm/a-illum-itaque');
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('@bobyzgirlllnpm/a-illum-itaque');
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

equalfast-deep-cloneredirectfigletstyled-componentsclassnamesshamconfigurablemulti-packagecloudtrailjsdiffidcryptoperformanceTypedArrayenumerablescheme-validationreplaycss lessloggerString.prototype.trimjestbufferargumentsyntaxbufferscloudfrontcommand-lineSymbol.toStringTagcomparemapsuperstructlengthcreateauthbootstrap cssinvarianthookformroute53chinesedotenvdependency managercorswidthrequestObject.entriesarraybufferjavascriptpipemergeroutechannelregular expressioncryptcallbinddescriptorsbrowserslisttimebrowserlistlocationbatches-shim APItypeerrorelbintrinsicbrowserlogES2023styleguidetyped arrayYAMLstableyupassertsUint8ClampedArraytrimStarttelephonecolorSymbolregular expressionsmodulethroatfast-cloneimmutablereact-testing-libraryentriesframeworkeventEmitterstreamsdeepcopycharacterutil.inspectdeep-copyfileform-validationcommanderpatchfullwidthnumberimmercheckECMAScript 2019omitkoreancolourFloat32ArrayeslintconfigaccessorlinkcallECMAScript 7argvutilexpressionmobilejsdomfiltershebangswfponyfilltypeofeslint-pluginbundlerarrayfetchforEachObject256extrawaittoolkiturlstatelessmatchesfullcachehasOwnPropertytakepreprocessormetadataoptionWebSocketeslintplugincallbackRxelmeventDispatcherwafclientflagrequiresliceCSShttphasmruless mixinsArray.prototype.containsflatinspectfast-copy__proto__emojiairbnbfindLastIndexagentiteratecollectionrateopenlintprettytypanionassertiami18nidlestylesamazonstarterawsreact-hooksObservableBigUint64ArrayfunctionalspecObject.assignrangeerrorreduxECMAScript 6bindcloudsearchprivatedebugpackage.jsonES2021class-validatortypesafees-shimsterminaloutputtapesnstermbcryptflatMapjwtglobdirectorybannerendpointECMAScript 2018containsfunctionschaiobjsequencecopyES2020stylesheetrm -rfgetintrinsicReactiveExtensionsxtermstoragegatewaylockfileoffsetvariablesjsxgenericssortcollection.es6tslibAsyncIteratorES2015byteLengthparentsfluxttycolumnsearchespreewgetregularformsduplexpnpm9linewrapESSetaccessibilityfull-widthdirUint32ArrayartpromisesfunctiontypeslimitedencryptionRegExp.prototype.flagsclassnamewordwraptc39syntaxerrordeleteclassesminimalcss variableES5typedarrayHyBiUnderscoredateObject.definePropertyJSON-Schemaeast-asian-widthES2017settersymlinkdependenciesratelimitkinesiswatchFilezeroprivate dataECMAScript 5valuesbootstrap lessjasminefindupjskeyspropertiesiteratorerrorstylingautoprefixerfile system@@toStringTagpackagerfc4122jQueryviewformatlook-upapollomakeelasticacheES6deep-clonermtaskcjkrecursivenegativefswhichpruneindicatorinternal slotveststylecloudformationtoSortedtouchMicrosoftlastsqstypescriptreactRxJSWeakSetbusy0parsinges2017statevpces2015shrinkwrapstructuredCloneextendsetTypeScriptstringifyqueryvisualastes8gdprwriteES2022Object.getPrototypeOfprotobufparsereadablewritableassigninputArray.prototype.findLastIndexemitdefinePropertyes7momentlazyURLpredictablereal-timelesscloneES2018es2016picomatchmapreducefasttesterbytees5descriptorio-tsbreakexecautoscalingless cssmovees6efficientJSONvalidaterobustfastclonefindisdayjsspinnermimetypePushmkdirtostringtagenvironmentsafeES3arktypeshimchromiummoduleshotcss nestingcall-binddatastructure.envvaluejsonpathhas-ownprotoRegExp#flagsenvpostcssmime-dbregexptrimLeftperformant$.extendwrapcssloggingcodeshttpscss-in-jsec2cloudwatchzoddomTypeBoxtapmiddlewareECMAScript 2017compilerrandomansirdsECMAScript 2020graphqlequalitynodejsglacierworkflowstringifierspeedgradients css3beanstalkwarningredactguidconsumeObject.iscode pointseveryformattinggetterinternalconfigsetImmediatereducerconcurrencyebsshellrmdirschemaboundwebhash[[Prototype]]objectredux-toolkitflattenObject.fromEntriestextgetoptvalidisConcatSpreadableArrayWebSocketsmochaelectronvariables in cssjsonFunction.prototype.namewatchersuperagentpolyfillsettingsnpmieliveprogressquotesestoStringTagconsolematchsymlinksreduce
1.0.0

1 year ago