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

array.prototype.findlast

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.findlast

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

  • 1.2.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11M
increased by0.53%
Maintainers
1
Weekly downloads
 
Created

What is array.prototype.findlast?

The array.prototype.findlast npm package extends the Array prototype to include a `findLast` method. This method allows users to search through an array from the end towards the beginning, returning the last element that satisfies a provided testing function. It is particularly useful for finding the last occurrence of elements in an array that meet certain criteria.

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

Finding the last element that meets a condition

This feature allows you to find the last element in an array that meets a specific condition. In the provided code sample, `findLast` is used to find the last even number in the array.

[1, 2, 3, 4, 5].findLast(element => element % 2 === 0)

Other packages similar to array.prototype.findlast

Keywords

FAQs

Package last updated on 19 Mar 2024

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