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

@bemoje/arr-any

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bemoje/arr-any

Check whether a condition is true for any element of an array. The condition check is in the form of a callback.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

@bemoje/arr-any

Check whether a condition is true for any element of an array. The condition check is in the form of a callback.

Version

NPM version

Travis CI

dependencies

Dependencies

dependencies

Stats

NPM downloads Forks

Donate

Buy Me A Beer donate button PayPal donate button

Installation

npm install @bemoje/arr-any
npm install --save @bemoje/arr-any
npm install --save-dev @bemoje/arr-any

Usage

import arrAny from '@bemoje/arr-any'

const arr = ['hi', 'there']

arrAny(arr, (element) => {
	return element === 'there'
})
//=> true

arrAny(arr, (element) => {
	return element.length === 5
})
//=> true

arrAny(arr, (element) => {
	return element.length > 5
})
//=> false

Tests

Uses Jest to test module functionality. Run tests to get coverage details.

npm run test

API

arrAny

Check whether a condition is true for any element of an array. The condition check is in the form of a callback.

Parameters
  • arr Array The array to iterate

  • callback callback callback(element, index, array): boolean

Returns

boolean

callback

Type: Function

Parameters
Returns

boolean

Keywords

FAQs

Package last updated on 30 Apr 2020

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