array-has-boolean

whether there is a value in array

Usage no npm install needed!

<script type="module">
  import arrayHasBoolean from 'https://cdn.skypack.dev/array-has-boolean';
</script>

README

Installation

// npm
npm install array-has-boolean --save

// yarn
yarn add array-has-boolean

数组中查找指定值,返回值是布尔类型

const { has } from 'array-has-boolean/dist/main'
const arr = [1, 2, 3]
const value = 4
const hasValue = has(arr, value)
// true