0.0.2 • Published 6 years ago
has-truthy v0.0.2
has-truthy
Takes an array, returns true if it contains one or more truthy items, otherwise returns false.
Installation
npm install --save has-truthy
Usage
import hasTruthy from 'has-truthy'
hasTruthy([undefined, false, 'truthy'])
//=> true
hasTruthy([undefined, false])
//=> false
hasTruthy({})
//=> Error: has-truthy expected an array, got "[object Object]". Type: object
License
This project is licensed under the MIT License
0.0.2
6 years ago