{"name":"array.prototype.findlastindex","version":"1.2.6","description":"An ESnext spec-compliant `Array.prototype.findLastIndex` shim/polyfill/replacement that works as far down as ES3.","author":{"name":"Jordan Harband","email":"ljharb@gmail.com","url":"http://ljharb.codes"},"funding":{"url":"https://github.com/sponsors/ljharb"},"contributors":[{"name":"Jordan Harband","email":"ljharb@gmail.com","url":"http://ljharb.codes"}],"license":"MIT","bugs":{"url":"https://github.com/es-shims/Array.prototype.findLastIndex/issues"},"homepage":"https://github.com/es-shims/Array.prototype.findLastIndex#readme","main":"index.js","exports":{".":"./index.js","./auto":"./auto.js","./polyfill":"./polyfill.js","./implementation":"./implementation.js","./shim":"./shim.js","./package.json":"./package.json"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","pretest":"npm run --silent lint","posttest":"npx npm@\">= 10.2\" audit --production","tests-only":"nyc tape 'test/**/*.js'","test":"npm run tests-only","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","postlint":"es-shim-api --bound","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/es-shims/Array.prototype.findLastIndex.git"},"keywords":["Array.prototype.findLastIndex","find","findLast","findLastIndex","array","ESnext","shim","polyfill","last","es-shim API"],"dependencies":{"call-bind":"^1.0.8","call-bound":"^1.0.4","define-properties":"^1.2.1","es-abstract":"^1.23.9","es-errors":"^1.3.0","es-object-atoms":"^1.1.1","es-shim-unscopables":"^1.1.0"},"devDependencies":{"@es-shims/api":"^2.5.1","@ljharb/eslint-config":"^21.1.1","auto-changelog":"^2.5.0","encoding":"^0.1.13","es-value-fixtures":"^1.7.1","eslint":"=8.8.0","evalmd":"^0.0.19","for-each":"^0.3.5","functions-have-names":"^1.2.3","globalthis":"^1.0.4","has-strict-mode":"^1.1.0","hasown":"^2.0.2","in-publish":"^2.0.1","npmignore":"^0.3.1","nyc":"^10.3.2","object-inspect":"^1.13.4","safe-publish-latest":"^2.0.0","tape":"^5.9.0"},"testling":{"files":["test/index.js","test/shimmed.js"]},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"_id":"array.prototype.findlastindex@1.2.6","gitHead":"e037a525a28d6694481a76db2e8719542b7505e2","_nodeVersion":"23.10.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==","shasum":"cfa1065c81dcb64e34557c9b81d012f6a421c564","tarball":"http://registry-npm.ywwl.com/array.prototype.findlastindex/download/array.prototype.findlastindex-1.2.6.tgz","fileCount":16,"unpackedSize":30509,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICuSq5d9Tk2H4eIVLiHiKlS0HRhq9Xa17eM5XWe3/+J3AiAI5ei2zmk1lQT6gvJmW9NKuZY52gKLGDLFfSI5bE/mig=="}],"size":9559,"noattachment":false,"key":"/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/array.prototype.findlastindex_1.2.6_1741976403065_0.7080863842770297"},"_hasShrinkwrap":false,"readme":"# array.prototype.findlastindex <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![dependency status][deps-svg]][deps-url]\n[![dev dependency status][dev-deps-svg]][dev-deps-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nAn ESnext spec-compliant `Array.prototype.findLastIndex` shim/polyfill/replacement that works as far down as ES3.\n\nThis package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the proposed [spec](https://tc39.es/proposal-array-find-from-last).\n\nBecause `Array.prototype.findLastIndex` depends on a receiver (the `this` value), the main export takes the array to operate on as the first argument.\n\n## Getting started\n\n```sh\nnpm install --save array.prototype.findlastindex\n```\n\n## Usage/Examples\n\n```js\nvar findLastIndex = require('array.prototype.findlastindex');\nvar assert = require('assert');\n\nvar arr = [1, [2], [], 3, [[4]]];\nvar isNumber = function (x) { return typeof x === 'number' };\n\nassert.deepEqual(findLastIndex(arr, isNumber), 3);\n```\n\n```js\nvar findLastIndex = require('array.prototype.findlastindex');\nvar assert = require('assert');\n/* when Array#findLastIndex is not present */\ndelete Array.prototype.findLastIndex;\nvar shimmed = findLastIndex.shim();\n\nassert.equal(shimmed, findLastIndex.getPolyfill());\nassert.deepEqual(arr.findLastIndex(isNumber), findLastIndex(arr, isNumber));\n```\n\n```js\nvar findLastIndex = require('array.prototype.findlastindex');\nvar assert = require('assert');\n/* when Array#findLastIndex is present */\nvar shimmed = findLastIndex.shim();\n\nassert.equal(shimmed, Array.prototype.findLastIndex);\nassert.deepEqual(arr.findLastIndex(isNumber), findLastIndex(arr, isNumber));\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/array.prototype.findlastindex\n[npm-version-svg]: https://versionbadg.es/es-shims/Array.prototype.findLastIndex.svg\n[deps-svg]: https://david-dm.org/es-shims/Array.prototype.findLastIndex.svg\n[deps-url]: https://david-dm.org/es-shims/Array.prototype.findLastIndex\n[dev-deps-svg]: https://david-dm.org/es-shims/Array.prototype.findLastIndex/dev-status.svg\n[dev-deps-url]: https://david-dm.org/es-shims/Array.prototype.findLastIndex#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/array.prototype.findlastindex.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/array.prototype.findlastindex.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/array.prototype.findlastindex.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=array.prototype.findlastindex\n[codecov-image]: https://codecov.io/gh/es-shims/Array.prototype.findLastIndex/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/es-shims/Array.prototype.findLastIndex/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/Array.prototype.findLastIndex\n[actions-url]: https://github.com/es-shims/Array.prototype.findLastIndex\n","publish_time":1741976403256,"_cnpm_publish_time":1741976403256,"dist-tags":{"latest":"1.2.6"}}