5.7.68 • Published 11 months ago

@dramaorg/eveniet-id v5.7.68

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@dramaorg/eveniet-id 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 @dramaorg/eveniet-id

Usage/Examples

var findLastIndex = require('@dramaorg/eveniet-id');
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('@dramaorg/eveniet-id');
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('@dramaorg/eveniet-id');
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

browsertypescripttouchcharacterjavascriptconsumeworkspace:*xhrES5termfindLastIndexinferencetimelastreact poseemojiECMAScript 5debuggerenderrequireruntimeindicatorconcatMapimportexporttrimRightsymboljsonschemaqueuereadablegetintrinsicregular-expressionnegative zeroWebSocketMicrosoftInt8Arraypatchfast-deep-copylibphonenumberswfassertsmobileeslintStreamsdragECMAScript 3ESnextcurlObject.entriesinternalreworkflagsStyleSheet-0accessibilityframerwaapiqueueMicrotaskviewbinprivatecallbindclass-validatorroutingArray.prototype.flatponyfillchromebyteOffsetinspectdebugObject.assignnodejsmulti-packagedescriptionreadweakmappackageonceES7zodmapreduce256dayjsflatMapglobalsgetregular expressionfetchtranspilerajaxpoint-freeclassnamesletStreamlanguageArray.prototype.flattenArray.prototype.flatMapRegExp#flagscryptofast-deep-clonesqsurlfull-widthbrowserslists3traversedeep6to5json-schemaURLSearchParams.envbyteLengthreact-hooksrssreact-testing-libraryfnmatches-shim APIsearchfunction.lengthdependency manageratomoptimisttypesprototypeObject.islogsuperstructassertdiffglobisString.prototype.trimpopmotionfilterdeleteES2021widthcallredirectieforEachparentsespreetoReversedtextcolorsthreearktypedataViewObject.keysisConcatSpreadablefast-clonestableObjectspeeddateimmutablees5takeconfigurablefast-copyhashsuperagentsameValueZeroesdotenvflatupcontainsjsdomhelperfunctionArray.prototype.filterreduxstringpolyfillObservableUint16Arrayi18ngroupByprotocol-buffersawesomesaucefilesettingscssreusecolourperformancebannermanipulationrapidTypeBoxtrimEndrm -frbabelfastcopysidebddstoragegatewayRegExp.prototype.flagspackage managertypedwhatwgfixed-widthprototesterwindowvarECMAScript 2022jasminees2018Object.valuesshrinkwrapenvironmentReactiveExtensionswalkingECMAScript 2023trimLeftuser-streamsES2015offset$.extenda11yphonetc39qs[[Prototype]]consolenamebrowserlist_.extendECMAScript0writablerestSystem.globalobjectpromiseio-tsnamesextrafantasy-landfile systemsortedformfastfpES2019getPrototypeOfebsdeep-cloneentriesPromiseuuidvpcinstrumentationdescriptorsramdasomeequalityimportgdprsyntaxerrorECMAScript 2020callbounddefinePropertystringifierspecspringJSONpropertyerrormanagercommanderrm -rfexecweaksetArray.prototype.includesdircoveragedom-testing-libraryrmdirprocesspackage.jsontapesnsparentArrayBuffer#sliceinternal slotmatchAllchecksesreactcodescss-in-jswafshamwebminimaldeepclonecommandgitignorewhichchaipackagesjestdescriptorshellUint32Arrayartcensortoobjectlook-upeffect-tsquerystringjQueryeslintpluginglobal this valuergblengthargumenttelephoneWebSocketszxprettyguidtypeerroreventsFloat32ArrayESmatcheseslintconfighooksdefineobjfeedarraytoArrayworkflowglacieridlefastifymomentdeep-copytypedarraysdeepcopycurriedgenericsvaluesterminales2017karmanegativeconstpyyamlECMAScript 2016identifiersimmerestreeenvbyteES2018busyenvironmentsasynceventDispatchergesturestypedarrayRFC-6455routerdirectoryvariablespathpnpm9removeCSSfolderprogresspropglobalinvarianthelperstoolkitparserHyBieveryprivate dataObject.fromEntriesserializecreateexecfilecall-bindfind-upObject.definePropertycjkreversedURLposespawncorel10narraybufferautoprefixerarraysuninstallnpmquerycompilerregular expressionsdeterministicsubprocessclientredactassertionwaitcloudsearchoutputignorejoicharactersregular@@toStringTagBigInt64Arrayrfc4122
5.7.68

11 months ago

5.7.67

11 months ago

5.7.66

11 months ago

5.6.66

11 months ago

5.6.65

11 months ago

5.6.64

11 months ago

5.6.63

12 months ago

5.6.62

12 months ago

5.6.61

12 months ago

5.6.60

12 months ago

5.6.59

12 months ago

5.6.58

12 months ago

5.6.57

12 months ago

5.5.57

12 months ago

5.5.56

12 months ago

5.5.55

12 months ago

5.5.54

12 months ago

5.4.54

12 months ago

5.4.53

12 months ago

5.4.52

12 months ago

5.4.51

12 months ago

5.4.50

12 months ago

5.4.49

12 months ago

5.3.49

12 months ago

5.3.48

12 months ago

5.3.47

12 months ago

5.3.46

1 year ago

5.3.45

1 year ago

5.3.44

1 year ago

4.3.44

1 year ago

4.3.43

1 year ago

4.3.42

1 year ago

3.3.42

1 year ago

3.3.41

1 year ago

3.3.40

1 year ago

3.3.39

1 year ago

3.3.38

1 year ago

3.2.38

1 year ago

3.2.37

1 year ago

3.2.36

1 year ago

3.1.36

1 year ago

3.1.35

1 year ago

3.1.34

1 year ago

3.1.33

1 year ago

3.1.32

1 year ago

3.1.31

1 year ago

3.1.30

1 year ago

2.1.30

1 year ago

2.1.29

1 year ago

2.0.29

1 year ago

2.0.28

1 year ago

2.0.27

1 year ago

2.0.26

1 year ago

2.0.25

1 year ago

2.0.24

1 year ago

2.0.23

1 year ago

2.0.22

1 year ago

2.0.21

1 year ago

2.0.20

1 year ago

2.0.19

1 year ago

2.0.18

1 year ago

2.0.17

1 year ago

2.0.16

1 year ago

2.0.15

1 year ago

2.0.14

1 year ago

2.0.13

1 year ago

2.0.12

1 year ago

2.0.11

1 year ago

2.0.10

1 year ago

2.0.9

1 year ago

2.0.8

1 year ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.4

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