# is-blank

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

Latest version **2.1.0** (published 2017-02-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-blank
pnpm add is-blank
yarn add is-blank
bun add is-blank
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2017-02-24 |
| First published | 2014-12-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/is-blank) |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | John Otander |
| Maintainers | johno |
| Keywords | string, blank, whitespace, object, array, empty |

## Links

- npm: https://www.npmjs.com/package/is-blank
- Repository: https://github.com/johnotander/is-blank
- Homepage: https://github.com/johnotander/is-blank#readme
- Issues: https://github.com/johnotander/is-blank/issues
- npm.io page: https://npm.io/package/is-blank

## Dependencies (2)

- [is-empty](https://npm.io/package/is-empty.md) latest
- [is-whitespace](https://npm.io/package/is-whitespace.md) latest

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 2.1.0 (latest) — 2017-02-24
- 2.0.0 — 2017-02-23
- 1.1.0 — 2015-10-22
- 1.0.0 — 2015-09-30
- 0.0.1 — 2014-12-06

## README

# is-blank [![Build Status](https://travis-ci.org/johnotander/is-blank.svg?branch=master)](https://travis-ci.org/johnotander/is-blank) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)

Check whether a value is empty or blank.

## Installation

```
npm i -S is-blank
```

## Usage

```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
```

## Related

- [is-empty](https://github.com/ianstormtaylor/is-empty)
- [is-whitespace](https://github.com/jonschlinkert/is-whitespace)
- [is-present](https://github.com/johnotander/is-present)

## 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](http://johnotander.com) ([@4lpine](https://twitter.com/4lpine)).

***

> This package was initially generated with [yeoman](http://yeoman.io) and the [p generator](https://github.com/johnotander/generator-p.git).

---
_Source: https://npm.io/package/is-blank · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
