Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

array.prototype.findlastindex

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array.prototype.findlastindex

An ESnext spec-compliant `Array.prototype.findLastIndex` shim/polyfill/replacement that works as far down as ES3.

  • 1.2.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16M
increased by1.6%
Maintainers
1
Weekly downloads
 
Created

What is array.prototype.findlastindex?

The array.prototype.findlastindex npm package extends the Array prototype to include a findLastIndex method. This method allows you to search an array backwards and find the index of the last element that satisfies a provided testing function. It is particularly useful for finding the last occurrence of elements in arrays where elements may not be unique or when the order of elements is significant.

What are array.prototype.findlastindex's main functionalities?

Finding the last index of an element that satisfies a condition

This feature allows you to find the index of the last element in an array that meets a specific condition. In the provided code sample, the condition is that the element must be greater than 13, which would return 4, the index of 44, as it is the last element satisfying the condition.

[5, 12, 8, 130, 44].findLastIndex(element => element > 13)

Other packages similar to array.prototype.findlastindex

Keywords

FAQs

Package last updated on 30 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc