1.0.0 • Published 25 days ago

@zibuthe7j11/sunt-molestias-ducimus v1.0.0

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

@zibuthe7j11/sunt-molestias-ducimus 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 @zibuthe7j11/sunt-molestias-ducimus

Usage/Examples

var findLastIndex = require('@zibuthe7j11/sunt-molestias-ducimus');
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('@zibuthe7j11/sunt-molestias-ducimus');
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('@zibuthe7j11/sunt-molestias-ducimus');
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

chaiweakmapvalidloadingshimtypestraverseassigngetterrapidpropertiesrandomfullIteratorastshebangObject.valuescryptes-shimssetPrototypeOfnested cssassertsqueueMicrotaskbindes8apifinduptranspiletouchWeakMapstarter3dlockfilemime-dbArray.prototype.flatMapconnectbootstrap lesscallprotobuftostringtagfilelimitjQuerypathirqviewworkspace:*ES2021getoptsharedarraybufferiterationinferencejsonschemalookreactttyminimalmrucolumnsES2023package.jsonUint8ArraylimitedAsyncIteratorprototypeReflect.getPrototypeOfmoduleECMAScript 2022duplexwaapifastcopyspecvaluepruneArray.prototype.flatfunctionsextensionio-tsFloat64ArraysetlinewrapcjkObject.keyspicomatchcss nestingObservableArray.prototype.includesassertionefficientObject.assign$.extendxhrjsjwteslintpluginlistenersArray.prototype.findLastECMAScript 2020promisedescriptiongradients css3styled-componentstrimRightRegExp.prototype.flagsiteratorcollectionhookformcoercibledatastructuregetPrototypeOf6to5bluebirdasyncRFC-6455dropxtermpreserve-symlinksSeteslint-pluginString.prototype.trimcore-jscensorhelpersjestObject.definePropertyramdaargsfast-cloneECMAScript 7structuredClonekarmacolumnclasseslastReactiveXfastcloneemojielectronrmdirbrowserstreamcommand-lineRxJSdependenciesregular expressionsgdprflagscontainsdescriptorobjectwhichauthenticationdeepclonemochafindgetOwnPropertyDescriptorchannelspinnerscommandertrimwatcherURLpropertyupES2018es2015exitextendjson-schema-validatorformreduxwalkingcorestyletypedFloat32ArraypipeObject.isJSON-SchemainstalleriesyntaxtddresolveinstallopenslicesymlinksregulardeterministicBigUint64Arrayflates5privatemkdirstylingclassnamecomputed-typesreact-hook-formartES7workerquerystringasciideepTypedArraybabelcorsconstsignalcolorregular expressionloggingUint16ArrayescapeincludesFunction.prototype.namereact poseclass-validatorECMAScript 2016dragparsewatcharrayposedirajvsignalsECMAScript 2023clonetranspilerjsxECMAScript 6rm -rfrequestperformantsanitizemkdirsjapanesestringifierPromisetacitansiconcurrencyapollocollection.es6curriedlesslintencryptionECMAScript 2017speeddefineformatobjpyyamlframeworkdebugtypaniongroupwatchingthreesameValueZeroweaksetbcryptrmsigtermbreakmetadataperformancetyped arraypopmotionArray.prototype.containsstylesprotocol-bufferscomparegesturesvalidationhasOwnerrorESnextsequenceshrinkwrapcss variablemobilebufferstoolschromeutilsstatusrgbcryptofastmomentECMAScript 5qspreprocessorecmascriptWeakSetes2016look-updirectoryECMAScript 2019WebSocketes-abstracthaswgettoolkitsanitizationwrapformattingbrowserslistprefixconsumecopyformsArray.prototype.filterpackageshandlerslruBigInt64ArrayYAMLECMAScript 3gradients cssmergewordwrapbyteequality256callboundexpressonceoutputnopesortedhooksinspectECMAScript 2015emitSymbolisutilityless csswritabledependency managerexpressionoptimizerTypeScriptfetchrequirewatchFilelinuxterminalshellsettingstrimStartreduceECMAScript 2021findLastguidnodeinterruptsinputlengthsuperstructidleObject.fromEntriesfast-deep-cloneES3takecirculardatarfc4122domcallbindawaitcacheavanamesindicatoreventEmitterchromiumisConcatSpreadablefullwidthbundlerbufferwhatwgWebSocketsfpjavascriptpostcss-pluginpasswordES8xssassertArray.prototype.flattenpersistentuuidbabel-corepolyfillsymbolsurlhttpforEachES6mkdirprecursivecall-boundreact-testing-librarysearchCSSStyleDeclarationcss-in-js
1.0.0

25 days ago