# dimns-is-empty-js

> Javascript empty value checker

Latest version **1.2.1** (published 2019-08-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install dimns-is-empty-js
pnpm add dimns-is-empty-js
yarn add dimns-is-empty-js
bun add dimns-is-empty-js
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2019-08-06 |
| First published | 2018-07-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 10 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | DimNS |
| Maintainers | dimns |
| Keywords | isEmpty, isEmpty.js |

## Links

- npm: https://www.npmjs.com/package/dimns-is-empty-js
- Repository: https://github.com/DimNS/isEmpty.js
- Issues: https://github.com/DimNS/isEmpty.js/issues
- npm.io page: https://npm.io/package/dimns-is-empty-js

## Recent versions

- 1.2.1 (latest) — 2019-08-06
- 1.2.0 — 2019-07-15
- 1.1.1 — 2019-04-25
- 1.1.0 — 2019-02-07
- 1.0.5 — 2018-10-19
- 1.0.4 — 2018-10-17
- 1.0.3 — 2018-07-25
- 1.0.2 — 2018-07-25

## README

# isEmpty.js

### **`isEmpty(value)`**
Check for empty value (null, undefined, number, string, object or array).

### **`notEmpty(value)`**
Check for not empty value (null, undefined, number, string, object or array).

## Install
```bash
npm i dimns-is-empty-js
```

## Usage
```html
<script type="text/javascript" src="dist/isEmpty.min.js">
<script type="text/javascript">
    // true
    console.log(isEmpty(null));
    console.log(isEmpty(undefined));
    console.log(isEmpty(NaN));
    console.log(isEmpty(''));
    console.log(isEmpty('    '));
    console.log(isEmpty({}));
    console.log(isEmpty([]));

    // false
    console.log(isEmpty('null'));
    console.log(isEmpty('undefined'));
    console.log(isEmpty(0));
    console.log(isEmpty(123));
    console.log(isEmpty('  spaces '));
    console.log(isEmpty({'1': '111', '2': '222'}));
    console.log(isEmpty(['111', '222']));
    console.log(isEmpty(function() {}));
    console.log(isEmpty(true));
    console.log(isEmpty(false));
    
    // true
    console.log(notEmpty('null'));
    console.log(notEmpty('undefined'));
    console.log(notEmpty(0));
    console.log(notEmpty(123));
    console.log(notEmpty('  spaces '));
    console.log(notEmpty({'1': '111', '2': '222'}));
    console.log(notEmpty(['111', '222']));
    console.log(notEmpty(function() {}));
    console.log(notEmpty(true));
    console.log(notEmpty(false));

    // false
    console.log(notEmpty(null));
    console.log(notEmpty(undefined));
    console.log(notEmpty(NaN));
    console.log(notEmpty(''));
    console.log(notEmpty('    '));
    console.log(notEmpty({}));
    console.log(notEmpty([]));
</script>
```

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