# error-if-not-primitive-or-array

> Function triggers error if argument is neither a primitive type or array

Latest version **1.0.3** (published 2019-04-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install error-if-not-primitive-or-array
pnpm add error-if-not-primitive-or-array
yarn add error-if-not-primitive-or-array
bun add error-if-not-primitive-or-array
```

## 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.0.3 |
| Published | 2019-04-09 |
| First published | 2018-10-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Steve Thompson |
| Maintainers | writetome51 |
| Keywords | error, message, primitive, array, type-checking, type, check, data-type |

## Links

- npm: https://www.npmjs.com/package/error-if-not-primitive-or-array
- npm.io page: https://npm.io/package/error-if-not-primitive-or-array

## Dependencies (1)

- [@writetome51/is-array-not-array](https://npm.io/package/@writetome51/is-array-not-array.md) ~1.0.0

## 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.3 (latest) — 2019-04-09
- 1.0.2 — 2019-03-12
- 1.0.1 — 2018-11-20
- 1.0.0 — 2018-10-09

## README

## errorIfNotPrimitiveOrArray(arg): void

Triggers a fatal error if `arg` is not a primitive (number, boolean, or string)   
or array.

### Installation
`npm i  error-if-not-primitive-or-array`

### Loading
```
// if using TypeScript:
import {errorIfNotPrimitiveOrArray} from 'error-if-not-primitive-or-array';
// if using ES5 JavaScript:
var errorIfNotPrimitiveOrArray = 
	require('error-if-not-primitive-or-array').errorIfNotPrimitiveOrArray;
```

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