# @writetome51/is-empty-not-empty

> 2 functions that check if the argument has a 'length' property === 0

Latest version **2.0.2** (published 2021-11-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @writetome51/is-empty-not-empty
pnpm add @writetome51/is-empty-not-empty
yarn add @writetome51/is-empty-not-empty
bun add @writetome51/is-empty-not-empty
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2021-11-15 |
| First published | 2019-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Steve Thompson |
| Maintainers | writetome51 |
| Keywords | is, empty, not, property, length, check, data |

## Links

- npm: https://www.npmjs.com/package/@writetome51/is-empty-not-empty
- Repository: https://github.com/writetome51/is-empty-not-empty
- Homepage: https://github.com/writetome51/is-empty-not-empty#readme
- Issues: https://github.com/writetome51/is-empty-not-empty/issues
- npm.io page: https://npm.io/package/@writetome51/is-empty-not-empty

## Dependencies (1)

- [@writetome51/has-value-no-value](https://npm.io/package/@writetome51/has-value-no-value.md) >=2.0.0

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2021-11-15
- 2.0.1 — 2020-08-11
- 2.0.0 — 2020-07-27
- 1.0.0 — 2019-04-08

## README

# isEmpty(arg): boolean

Returns true if `arg.length === 0`.

# notEmpty(arg): boolean

Returns true if `arg.length !== 0`.

## Examples
```js
isEmpty([]);
// --> true

isEmpty('');
// --> true

isEmpty({length: 0});
// --> true

isEmpty({length: -1});
// --> false 

isEmpty();
// TypeError: "Cannot read property 'length' of undefined"

isEmpty(0);
// Error: "Input must have a 'length' property"

notEmpty([0]);
// --> true

notEmpty('  ');
// --> true

notEmpty({length: -1})
// --> true

notEmpty();
// TypeError: "Cannot read property 'length' of undefined"

notEmpty(1);
// Error: "Input must have a 'length' property"
```

## Installation
`npm i  @writetome51/is-empty-not-empty`

## Loading
```js
import { isEmpty, notEmpty } from '@writetome51/is-empty-not-empty';
```

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