1.0.0 • Published 1 year ago

@osjwnpm/nostrum-repudiandae-dolorum v1.0.0

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

@osjwnpm/nostrum-repudiandae-dolorum Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

An ESnext spec-compliant Array.prototype.findLastIndex 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.findLastIndex 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 @osjwnpm/nostrum-repudiandae-dolorum

Usage/Examples

var findLastIndex = require('@osjwnpm/nostrum-repudiandae-dolorum');
var assert = require('assert');

var arr = [1, [2], [], 3, [[4]]];
var isNumber = function (x) { return typeof x === 'number' };

assert.deepEqual(findLastIndex(arr, isNumber), 3);
var findLastIndex = require('@osjwnpm/nostrum-repudiandae-dolorum');
var assert = require('assert');
/* when Array#findLastIndex is not present */
delete Array.prototype.findLastIndex;
var shimmed = findLastIndex.shim();

assert.equal(shimmed, findLastIndex.getPolyfill());
assert.deepEqual(arr.findLastIndex(isNumber), findLastIndex(arr, isNumber));
var findLastIndex = require('@osjwnpm/nostrum-repudiandae-dolorum');
var assert = require('assert');
/* when Array#findLastIndex is present */
var shimmed = findLastIndex.shim();

assert.equal(shimmed, Array.prototype.findLastIndex);
assert.deepEqual(arr.findLastIndex(isNumber), findLastIndex(arr, isNumber));

Tests

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

stylesheetObservablesfind-upprefixprettyclassnamesES5trimEndgetPrototypeOfjsonArray.prototype.findLastIndexstylestoArrayfastifysetterentriesnumberdatereducerwalkingflagassertiones7Int8ArrayObservablecodescharacterslintmatchescore-js256bindprotobufSetloadbalancingchailistenersreact-testing-librarycode pointssameValueZeroprototypepositiveintrinsicURLSearchParamsredirectquerywriteless cssstdlibutilityownStreamsespreeescapegetoptpathsideequalityObject.valuestrimLeftelectrondeleteindicatorpreprocessorwgetUnderscorejavascript_.extendgradients cssformatwarningforEachbrowserlistsymlinkduplexECMAScript 2022inputconcatMapbootstrap cssrgbperformantpruneexpressioncomputed-typesoptimizerimportexportpropreuseexpressECMAScript 5queueMicrosoftincolourflateslintconfigtddBigUint64ArraydataViewsuperagentString.prototype.matchAllaccessibilitybluebirdrobustmoduleio-tsarraygettervaluesstatecommandmakecloudsearches8Object.entrieskinesisArray.prototype.includesURLestreethrottlereact-hooksstringifyoptimistpnpm9Object.assigncallbackcreatedeterministicbyteOffsettypedarrayparsehttpsuuideventEmitterroute53hooksasciifull-widthaccessorpackage.jsonreplaynegativeinstallervalueclass-validatorfromES2015Array.prototype.containsreact-hook-formmapreduceregular expressionsurlUint16Arrayform-validationavaclienteverybufferlockfilebundlerefficientjsonpathcjkprotocol-bufferssafestreamtermbatchobjcallbindpropertynamesArrayBuffer.prototype.sliceglaciervpcenvES8terminalmetadataupmimetypesRegExp.prototype.flagswordbreakvariablesrandomfullwidthlogsetImmediateischaracterconfigurableiteratearraybufferUint8Arraydeepcopylastroutingawesomesaucehigher-orderECMAScript 2015Array.prototype.flattenmonorepoYAMLsomespeedmochastringifieridlerfc4122findupmake dirdataviewstyleguideInt16Arraycloneboundchromiumslotes-shimscircularworkerECMAScript 2020regexlazyECMAScript 2017npmformattingnegative zerofstyped arrayxhrfile systemRegExp#flagsartasynctypanioncolumnseventsfixed-widthjasmineshrinkwrapnoderedactpolyfillastcacheECMAScript 3findLastauthES7optioncoreregexpunicodeutil.inspectformfastcopyansiTypeBoxperformancechinesedescriptionl10nproxydatastructureES2022tasktoobjectES2018less compilerremoveelasticacheUint32Arrayregular expressionenderdescriptorsextragetnativejoihelperserrorvalidatewhatwgECMAScript 2023browserslistpicomatchfast-clonefastpackage managereventDispatcherECMAScript 7syntaxsequencelessesfunctionrmdirObjectrmassertsredux-toolkitReactiveXpackageguidESfast-deep-copycloudfrontnested cssECMAScript 2021gdprgroupByreadableObject.ishasOwnPropertytraverseSymboldotenvECMAScript 2019persistentminimal.envSymbol.toStringTaggradients css3sqsbcryptlesscssemitbrowserobjectelbsuperstructArrayBufferES3japaneseiamencryptiondifftime0asserttypesafeInt32Arraycommand-linetestermomentstyleWeakSetRxwatchFilemovetoSortedwaitpredictabletypesgrouptypeofmatchAllsettingsa11ytelephonestoragegatewayless.jselmeslintless mixinskeysJSONcryptapollotake@@toStringTagstreamsdeep-copymkdirpcollectionswfprivatepushlibphonenumbermrutsshamwordwrapfullschemestylingstatelessargparsetslibponyfillES2017containsclassnamefindLastIndexdropIteratorhas-owncall-boundReflect.getPrototypeOfregulardayjsWeakMaprecursiveObject.fromEntriesthroatjsdiffmimesyntaxerrorphonepatchcallcompile lessworkflowopensnsconnectttytrimratelimitCSSStyleDeclarationuninstallbootstrap lesstypescriptdeep-cloneObject.definePropertyrequirewalkcompilermulti-packagelook-upRxJSconcurrencyframeworkfast-copyes-shim APIfindsymbolswidthpassworddomgetintrinsiceslintpluginArray.prototype.flatMapsimpledbserializationratemixinscolorshttpfseventscensores2015flagsprogresssymbol$.extendsethashruntimeslicecomparebuffersxtermbreakcolorcloudtrailajaxinvariantcloudformationcopywrapPushjeststyled-componentsmodulesshimsetPrototypeOfes2018flatMaphookformcryptooffsetmobiledirES2023equaldependency managervalidationclassesArraycall-bindairbnbStreammkdircss lesshasdeepclonemkdirslimitedmatchstructuredCloneimmutablebytepropertiesStyleSheetsortarktypes3trimStarteast-asian-widthdefinePropertyES6argvloggerlanguageviewoutputspinnerinstalltoolkititerationcoercibledescriptorautoscalingcallboundconcatspinnersnopetapeHyBireadES2021utilJSON-SchemaES2019watchingweaksetpluginec2mime-dbqsawaitkarmareadablestreampackagesspecendpointjQueryconsumetrimRightRFC-6455inferencedependenciesjsxArray.prototype.filtershebangsearchecmascriptdataenvironmentbannerscheme-validationi18nzodloadingrequestzerotapvestsymlinksrangeerrorworkspace:*configstarterfigletwatcheragentidwafUint8ClampedArrayeslint-pluginAsyncIteratorassignFunction.prototype.nameString.prototype.trimcss variablefilelengthconsoletestingfpsiteratorcollection.es6[[Prototype]]mapjwtcurlarraysvariables in cssbundlingfast-deep-clonepromisecloudwatchparentnodejsfunctionses6importfolderhardlinksjsdomES2016TypeScriptBigInt64ArrayextendESnextweblocationreactmergees2016namebusysharedarraybufferdynamodbemojiprotobddajvECMAScript 2016Float32ArraycolumnargsextensionlinkreduceseswatchformsCSSArrayBuffer#slicesharedECMAScript 6argumentReactiveExtensionsstringparsingrm -fryuptouchtc39
1.0.0

1 year ago