Skip to content

johno/is-blank

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-blank Build Status js-standard-style

Check whether a value is empty or blank.

Installation

npm i -S is-blank

Usage

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

Related

License

MIT

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Crafted with <3 by John Otander (@4lpine).


This package was initially generated with yeoman and the p generator.

About

Check whether a value is empty or blank, includes string whitespace support.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy