2.2.34 • Published 1 year ago

@hishprorg/illum-animi-minus v2.2.34

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

@hishprorg/illum-animi-minus Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

An ESnext spec-compliant Array.prototype.findLast 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.findLast 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 @hishprorg/illum-animi-minus

Usage/Examples

var findLast = require('@hishprorg/illum-animi-minus');
var assert = require('assert');

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

assert.deepEqual(findLast(arr, isNumber), 3);
var findLast = require('@hishprorg/illum-animi-minus');
var assert = require('assert');
/* when Array#findLast is not present */
delete Array.prototype.findLast;
var shimmed = findLast.shim();

assert.equal(shimmed, findLast.getPolyfill());
assert.deepEqual(arr.findLast(isNumber), findLast(arr, isNumber));
var findLast = require('@hishprorg/illum-animi-minus');
var assert = require('assert');
/* when Array#findLast is present */
var shimmed = findLast.shim();

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

Tests

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

iconvArrayBufferstringifyworkspace:*preserve-symlinksrequireloadingstyleguideanimationnameutil.inspectjestdeep-cloneformateventDispatchersymbolsStreamshrinkwrappromiseECMAScript 2018javascriptajaxsafees2017es5computed-typesbusyrandomdragESnextECMAScript 3findLastIndexsearchdiffwidthtc39postcssoutputcolourebsmake dirmkdirsdotenvcoloravaES2022picomatchutilitycollectionArray.prototype.containssharedagentdateinputfigletPushstatelessObject.getPrototypeOfvalidationeventsjsonqueueMicrotaskprototypecore-jsoptionpackage manageriam_.extendECMAScript 2020wordbreakscheme-validationdeepcloneupimmutabledataViewinstalleransicryptobanners3forEachquerycopytslibObjectTypedArrayzodgetPrototypeOfdeepcopyformsutilArray.prototype.flatMapnativemovefromi18nES7workflowmetadatajQuerybluebirdstructuredClonecircularURLhardlinkstapedirectoryprogressReactiveExtensionsyupredux-toolkitidentifiersdatastructureECMAScript 5256traversestablestyled-componentscompilercall-bindpluginawaitAsyncIteratorcallbindminimaldescriptorsString.prototype.matchAllES5react posemakexhrmodulelogsameValueZerowarningeslintpluginthroatsymbolcontainsfinduprangeerrorequalityObject.definePropertyarrayschromiumweakseteveryrobustautoscalingpolyfillformattingspinnerArray.prototype.flattenasyncdropperformantobjectsomeimmerratelimittrimLeftES6queuestylestostringtagfastcopyiterationrecursivesetPrototypeOf__proto__duplexmatchAlljsxmapreducehookformgetoptdependenciesmobileSetbyteinstallextensionloggerimportemitspringcloudtrailkeyparsererrorRegExp#flagsUint32Arraysuperstructrm -frRegExp.prototype.flagsbyteOffsetpositive0awesomesauceexeRxJSprocessstartassignString.prototype.trimshebangclonenodereadableArray.prototype.findLastIndextextprivateObject.keysassertxdg
2.0.15

1 year ago

2.0.16

1 year ago

2.1.25

1 year ago

2.1.23

1 year ago

2.1.24

1 year ago

2.2.33

1 year ago

2.2.34

1 year ago

2.1.22

1 year ago

2.2.31

1 year ago

2.2.32

1 year ago

2.2.30

1 year ago

2.0.19

1 year ago

2.0.17

1 year ago

2.0.18

1 year ago

2.2.28

1 year ago

2.2.29

1 year ago

2.2.26

1 year ago

2.2.27

1 year ago

2.0.22

1 year ago

2.2.25

1 year ago

2.0.20

1 year ago

2.0.21

1 year ago

2.0.14

1 year ago

2.0.13

1 year ago

2.0.11

1 year ago

2.0.12

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

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