6.9.92 • Published 1 year ago

@patrtorg/aperiam-tempora v6.9.92

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

@patrtorg/aperiam-tempora 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 @patrtorg/aperiam-tempora

Usage/Examples

var findLastIndex = require('@patrtorg/aperiam-tempora');
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('@patrtorg/aperiam-tempora');
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('@patrtorg/aperiam-tempora');
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

user-streamselbtermES2021compilersettercolores2016matchAllwhichassertiontransportbinariesaccessibilityhandlersRFC-6455deletenodejscallbacktestercolourregexpglobal this value.envstarterapolloglobECMAScriptES2023signalsharmonyES2015invariantgetPrototypeOfwriteastextendpopmotionawesomesaucefantasy-landsyntaxerrorcore-jssetArray.prototype.flatMapgitignoredependency manageruploadansiwarningio-tsbannerCSSStyleDeclarationzeroargvcolumndynamodbJSONlocationES6optimistArray.prototype.findLastIndexoperating-systemkinesisless.js[[Prototype]]getterfile systemtraversecreateinferenceArray.prototype.flatlessform-validationnegative3dreact-testing-libraryirqarraybuffer256routingsigintvisualjavascriptlengthsymbolsselfbundlingsescheckes2017Uint32Arrayentriestouchquerystringtyped arraydom-testing-libraryterminalvarcurlutilitiesbinprettyobjes-shimsmatchesconsumeECMAScript 2017dependenciestranspileObject.definePropertylogginghttpauthenticationvalidategetintrinsiceslintpluginsameValueZerominimallistenersfull-widthestreeES2020fixed-widthES5typesArray.prototype.filteryamlbyteOffsetinputexecfileiteratepropertiesassignjestless mixinsforEachdeep-copypropespreejsdomacornclassnamesrapidprototypeECMAScript 7es-shim APIcss lessnopeperformantECMAScript 3formstoobjectramdareducerpinomobiledirinstallerreadablewritablereadrandomutilrobustserializeStreamsviewstatusiamtoSortedflagsjsxES3argspushcall-boundvpcautoprefixeres2015mkdirsamazonwindowdescriptorbinarykoreanRxfastifypluginglacierpredictablejsonschemattyenvgraphqldescriptorsarraysgetOwnPropertyDescriptorartinwgetESnextschemaredux-toolkittostringtaggenericsUint8ClampedArraystatelessjson-schemahas-ownvalidatorindicatorfront-endcommand-lineECMAScript 6importexportisConcatSpreadable.gitignoreregular-expressionstoragegatewayprefixpatchglobal objectexecreadablestreampromiseES2022formvalidjsFunction.prototype.namemodulesnumberObject.assignReactiveXspawnsidecallbindSystem.globalkeysslotphonecompareArray.prototype.findLastcollection.es6schemehardlinksurlmonorepoInt16Arraymakedragoutputtypefetchstreampipesyntaxglobalsjoies7jwtECMAScript 2020configbrowsersliststreamsexitsymlinksUnderscoreStyleSheetRegExp.prototype.flagsArrayBuffer.prototype.slicegroupByshamcjkcoercibleeventsspecebstimecryptdatecorejsonemitObservablearraytranspilerasterisksexpressiontaketypeofelasticachegestureswafpersistentzxjson-schema-validatorenvironmentautharktypesimpledbecmascriptimporttrimLeftsubprocesswalktypanionbuffersinternal slotzodreact-componentvariablessetImmediateworkflowpreserve-symlinkssharedarraybuffertelephonecompile lessback-endemrfluxexpressperformancehash0errorclonepackage.jsonworkspace:*Int32ArrayweakmapstructuredClonehasletvalidationgradients csstacitreusees-abstractinspectvaluemake dirredirectgroupdeepcopyname__proto__waitvestfilefromtc39stylediffoptimizerlrudotenvfigletECMAScript 2023environmentsglobalThisyup6to5BigUint64ArrayReactiveExtensionsfullreplaygetoptmkdirpeslintconfigpicomatchcallboundHyBitestingfastcloneeslint-pluginmetadatapolyfillanimationESbootstrap cssfpsnested cssmergepathimmercontainsloadingconsolereduceuninstalls3computed-typesdayjsObject.keyschaiserializationsetPrototypeOfRegExp#flagswidthprocessa11yqsincludesReflect.getPrototypeOftoolkitprotobufidleproxyoffsetlastawscloudtraildroptrimRightkeytestgdprpoint-freeclassesdeepclonenameschromeiefindLastIndexlintcloudfrontajaxgetString.prototype.matchAlltypesafeelectronregularbundlerxtermArrayBufferes8languagemapreduceES7copysafesuperstructpropertycodesexecuteclientinterruptsponyfillsignedbddtrimEndutilitypositivepackagesfindLastnodecall-bindparsercss-in-jsasyncString.prototype.trimPromiseendpointECMAScript 5typedarraynegative zeroIteratorlogbabel-coreonceaccessorfast-clonePushpackage managernpmdeterministicredactpnpm9everycommanderbabelcryptonativeWebSocketconcatfunctionssuperagentidentifiersreact animationdeepparseownconfigurableflatspringbrowserliststyled-componentsTypeBoxrequestmodulecolumnsefficientreduxhandlerrules
5.9.86

1 year ago

5.9.87

1 year ago

5.9.85

1 year ago

5.8.85

1 year ago

5.8.81

1 year ago

5.8.82

1 year ago

5.8.83

1 year ago

5.8.84

1 year ago

5.8.80

1 year ago

5.8.74

1 year ago

5.8.75

1 year ago

5.8.76

1 year ago

5.8.77

1 year ago

6.9.92

1 year ago

6.9.91

1 year ago

6.9.90

1 year ago

5.8.78

1 year ago

5.8.79

1 year ago

6.9.89

1 year ago

6.9.88

1 year ago

6.9.87

1 year ago

5.8.72

1 year ago

5.8.73

1 year ago

5.7.70

1 year ago

5.7.72

1 year ago

5.7.71

1 year ago

5.7.69

1 year ago

5.7.68

1 year ago

5.7.67

1 year ago

5.7.66

1 year ago

5.7.65

1 year ago

5.7.64

1 year ago

5.7.63

1 year ago

5.6.63

1 year ago

5.6.62

1 year ago

5.6.61

1 year ago

5.6.60

1 year ago

5.6.59

1 year ago

5.6.58

1 year ago

5.6.57

1 year ago

5.6.56

1 year ago

5.6.55

1 year ago

5.6.54

1 year ago

5.6.53

1 year ago

5.6.52

1 year ago

5.6.51

1 year ago

4.6.51

1 year ago

4.6.50

1 year ago

4.5.50

1 year ago

3.5.50

1 year ago

3.5.49

1 year ago

3.5.48

1 year ago

3.5.47

1 year ago

3.5.46

1 year ago

3.5.45

1 year ago

3.5.44

1 year ago

3.5.43

1 year ago

3.5.42

1 year ago

3.5.41

1 year ago

3.5.40

1 year ago

3.5.39

1 year ago

3.5.38

1 year ago

3.5.37

1 year ago

3.5.36

1 year ago

3.4.36

1 year ago

3.4.35

1 year ago

3.4.34

1 year ago

3.3.34

1 year ago

3.3.33

1 year ago

3.3.32

1 year ago

3.3.31

1 year ago

3.3.30

1 year ago

3.3.29

1 year ago

3.2.29

1 year ago

3.1.29

1 year ago

3.1.28

1 year ago

3.1.27

1 year ago

3.0.27

1 year ago

3.0.26

1 year ago

3.0.25

1 year ago

3.0.24

1 year ago

3.0.23

1 year ago

3.0.22

1 year ago

3.0.21

1 year ago

3.0.20

1 year ago

3.0.19

1 year ago

3.0.18

1 year ago

3.0.17

1 year ago

3.0.16

1 year ago

3.0.15

1 year ago

3.0.14

1 year ago

3.0.13

1 year ago

3.0.12

1 year ago

3.0.11

1 year ago

3.0.10

1 year ago

3.0.9

1 year ago

3.0.8

1 year ago

3.0.7

1 year ago

3.0.6

1 year ago

2.0.6

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago