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

array-find

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-find

ES6 Array.find ponyfill. Return the first array element which satisfies a testing function.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is array-find?

The array-find npm package provides a simple utility to find the first element in an array that satisfies a provided testing function. It is a lightweight alternative to the native Array.prototype.find method, offering similar functionality.

What are array-find's main functionalities?

Finding an element in an array

This feature allows you to find the first element in an array that satisfies a given condition. In this example, the condition is that the element should be greater than 3.

const find = require('array-find');
const array = [1, 2, 3, 4, 5];
const found = find(array, function(element) {
  return element > 3;
});
console.log(found); // Output: 4

Other packages similar to array-find

Keywords

FAQs

Package last updated on 21 May 2015

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