1.1.12 • Published 6 days ago

@diotoborg/quis-tempore-distinctio v1.1.12

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

@diotoborg/quis-tempore-distinctio 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 @diotoborg/quis-tempore-distinctio

Usage/Examples

var findLastIndex = require('@diotoborg/quis-tempore-distinctio');
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('@diotoborg/quis-tempore-distinctio');
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('@diotoborg/quis-tempore-distinctio');
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

JSONconcatMapkoreandompackagesi18nworkerhigher-ordertstoolkittypeofloggingsyntaxerrorECMAScript 7configyamlhelpererror.envwrapvariablesoffsetmimetypesistanbuldeep-cloneprototypeStreamdeterministicsqscurlexpressionECMAScript 2016ES2017environmentsutiljsonpluginstreamhas-owncolourwritablestringifypopmotionasserteslint-pluginvalidationavaFloat32Arraythroatpostcss-pluginquerywebsitelookdotenvfastanimationamazonfetchoptimistjshintpropertiesforEachassertionemitwidthschemarm -frlinewrapjsonpathcsschecktypes256bddprettycomputed-typesentriesfpspathrmdirzodnodetoolsapolloparseshebanghardlinksbrowsers3isConcatSpreadablerandomwaapicallboundWebSocketsURLSearchParamsbufferspecrdstapemapcacheiconvES2020regexconcurrencypnpm9reduxkarmaString.prototype.trimnamessimple cacheInt16Arrayinstallercommand-linedatastructurehttpArray.prototype.includessliceflagscloudwatchloggergroupBystylesfastcopypropertyoptimizerstyled-componentsinvariantgdprfindupTypeBoxlinkurlyupcollection.es6escapejapanesekey valueunicodePromisegetPrototypeOfdeepcopystylingfunctionsObject.definePropertyasyncfixed-widthaccessibilityeventEmittershimsetterartrgbgettermimeupFunction.prototype.namesymbolslaunchstringTypedArray$.extendthreepromisesfolderArray.prototype.findLastIndexextensionjQueryprotocol-bufferstypescriptstdlibprunecallbindawaitfunctionalObject.entriesclass-validatorhashchildserializationairbnbcloudsearchCSSsometrimsequenceinstrumentationidentifiersparentssharedarraybufferJSON-SchemaratelimitgroupinspectmatcheslintpluginESreact animationreact-hook-formES5definePropertyglobalvaluebytepushlintRegExp.prototype.flagsiteratedeleteES2023IteratorhookformcodesrequestES7applockfilefullwidthECMAScript 2023equalityreadablelocationes-shimsbreakpackage managerswfinferenceautoscalingfindLastTypeScriptES6assertsprefixdataViewmetadatafast-deep-clonegesturestestinges2018speedECMAScript 5descriptionsymlinkpreserve-symlinksquerystringreadablestreammime-dblogstatelessiterationsymlinksperformantfile cachetextcharsetcolorscensorstyleguidecloudfrontxtermbeanstalkendpointhelperstoStringTagUnderscorejsdiffECMAScript 2019patchprivateWeakSetfastifyexeflatMapSymbolreact-hooksajvreactquoteconfigurableURLeslintconfigYAMLposeresolveSymbol.toStringTagchaibindsyntaxRxsortedsetPrototypeOfisconsolecallfigletrfc4122elasticache
1.1.12

6 days ago

1.1.9

9 days ago

1.1.8

10 days ago

1.1.11

7 days ago

1.1.10

8 days ago

1.1.7

11 days ago

1.1.6

12 days ago

1.1.5

13 days ago

1.1.4

14 days ago

1.1.3

15 days ago

1.1.2

16 days ago

1.1.1

17 days ago

1.1.0

18 days ago

1.0.0

19 days ago