@bemoje/arr-has

1.0.1 • Public • Published

@bemoje/arr-has

Returns true if the element exists in the array

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-has
npm install --save @bemoje/arr-has
npm install --save-dev @bemoje/arr-has

Usage

import arrHas from '@bemoje/arr-has'

const arr = [1, 2, 3]

arrHas(arr, 2)
//=> true

arrHas(arr, 4)
//=> false

arrHas(arr, 'asd')
//=> false

Tests

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

npm run test

API

arrHas

Returns

true if the element exists in the array

Parameters
  • arr Array The array to search

  • element any The element to find

Returns

boolean

/@bemoje/arr-has/

    Package Sidebar

    Install

    npm i @bemoje/arr-has

    Weekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    7.39 kB

    Total Files

    5

    Last publish

    Collaborators

    • bemoje