# error-if-length-is-zero

> Function triggers error if argument has length === 0

Latest version **1.0.1** (published 2020-07-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install error-if-length-is-zero
pnpm add error-if-length-is-zero
yarn add error-if-length-is-zero
bun add error-if-length-is-zero
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-07-28 |
| First published | 2020-07-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Steve Thompson |
| Maintainers | writetome51 |
| Keywords | error, message, length, not, greater, than, zero, value, check |

## Links

- npm: https://www.npmjs.com/package/error-if-length-is-zero
- Repository: https://github.com/writetome51/error-if-length-is-zero
- Homepage: https://github.com/writetome51/error-if-length-is-zero#readme
- Issues: https://github.com/writetome51/error-if-length-is-zero/issues
- npm.io page: https://npm.io/package/error-if-length-is-zero

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2020-07-28
- 1.0.0 — 2020-07-27

## README

# errorIfLengthIsZero(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arg: { length: number }<br>): void

Triggers error "Input must have length greater than zero" if  
`!(arg.length) || arg.length < 1` .

## Installation
`npm i  error-if-length-is-zero`

## Loading
```js
import { errorIfLengthIsZero }  from 'error-if-length-is-zero';
```

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