Check whether a value is empty or blank, includes string whitespace support
npm install is-blankCheck whether a value is empty or blank.
```
npm i -S is-blank
`js
const isBlank = require('is-blank')
isBlank([]) // => true
isBlank({}) // => true
isBlank(0) // => true
isBlank(function(){}) // => true
isBlank(null) // => true
isBlank(undefined) // => true
isBlank('') // => true
isBlank(' ') // => true
isBlank('\r\t\n ') // => true
isBlank(['a', 'b']) // => false
isBlank({ a: 'b' }) // => false
isBlank('string') // => false
isBlank(42) // => false
isBlank(function(a,b){}) // => false
`
- is-empty
- is-whitespace
- is-present
MIT
1. Fork it
2. Create your feature branch (git checkout -b my-new-feature)git commit -am 'Add some feature'
3. Commit your changes ()git push origin my-new-feature`)
4. Push to the branch (
5. Create new Pull Request
Crafted with <3 by John Otander (@4lpine).
*
> This package was initially generated with yeoman and the p generator.