Socket
Socket
Sign inDemoInstall

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.


Version published
Maintainers
1
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 06 Feb 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