# error-if-not-string

> Function triggers error if argument is not type 'string'

Latest version **2.0.0** (published 2020-07-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install error-if-not-string
pnpm add error-if-not-string
yarn add error-if-not-string
bun add error-if-not-string
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2020-07-27 |
| First published | 2019-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Steve Thompson |
| Maintainers | writetome51 |
| Keywords | error, message, not, string, type-checking, type, check, data-type |

## Links

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

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

- 2.0.0 (latest) — 2020-07-27
- 1.0.0 — 2019-04-08

## README

# errorIfNotString(arg): void

Triggers error "Input must be string" if `arg` is not a string.


## Installation
`npm i  error-if-not-string`

## Loading
```js
import { errorIfNotString } from 'error-if-not-string';
```

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