Gathering detailed insights and metrics for @teamteanpm2024/distinctio-doloribus-dicta
Gathering detailed insights and metrics for @teamteanpm2024/distinctio-doloribus-dicta
Gathering detailed insights and metrics for @teamteanpm2024/distinctio-doloribus-dicta
Gathering detailed insights and metrics for @teamteanpm2024/distinctio-doloribus-dicta
npm install @teamteanpm2024/distinctio-doloribus-dicta
Typescript
Module System
Node Version
NPM Version
48.7
Supply Chain
32.1
Quality
79.2
Maintenance
100
Vulnerability
100
License
Cumulative downloads
Total Downloads
Last day
0%
2
Compared to previous day
Last week
600%
7
Compared to previous week
Last month
-11.1%
8
Compared to previous month
Last year
0%
353
Compared to previous year
41
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.
1npm install --save @teamteanpm2024/distinctio-doloribus-dicta
1var findLastIndex = require('@teamteanpm2024/distinctio-doloribus-dicta'); 2var assert = require('assert'); 3 4var arr = [1, [2], [], 3, [[4]]]; 5var isNumber = function (x) { return typeof x === 'number' }; 6 7assert.deepEqual(findLastIndex(arr, isNumber), 3);
1var findLastIndex = require('@teamteanpm2024/distinctio-doloribus-dicta'); 2var assert = require('assert'); 3/* when Array#findLastIndex is not present */ 4delete Array.prototype.findLastIndex; 5var shimmed = findLastIndex.shim(); 6 7assert.equal(shimmed, findLastIndex.getPolyfill()); 8assert.deepEqual(arr.findLastIndex(isNumber), findLastIndex(arr, isNumber));
1var findLastIndex = require('@teamteanpm2024/distinctio-doloribus-dicta'); 2var assert = require('assert'); 3/* when Array#findLastIndex is present */ 4var shimmed = findLastIndex.shim(); 5 6assert.equal(shimmed, Array.prototype.findLastIndex); 7assert.deepEqual(arr.findLastIndex(isNumber), findLastIndex(arr, isNumber));
Simply clone the repo, npm install
, and run npm test
No vulnerabilities found.
No security vulnerabilities found.