# behaveplus-validate-parms

> BehavePlus function parameter validation methods

Latest version **0.2.0** (published 2019-02-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install behaveplus-validate-parms
pnpm add behaveplus-validate-parms
yarn add behaveplus-validate-parms
bun add behaveplus-validate-parms
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2019-02-14 |
| First published | 2019-02-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 26.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Collin D. Bevins |
| Maintainers | cbevins |
| Keywords | BehavePlus, parameter, validation |

## Links

- npm: https://www.npmjs.com/package/behaveplus-validate-parms
- Repository: https://github.com/cbevins/behaveplus-validate-parms
- Homepage: https://github.com/cbevins/behaveplus-validate-parms#readme
- Issues: https://github.com/cbevins/behaveplus-validate-parms/issues
- npm.io page: https://npm.io/package/behaveplus-validate-parms

## Dependencies (1)

- [check-types](https://npm.io/package/check-types.md) 8.0.1

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2019-02-14
- 0.1.6 — 2019-02-14
- 0.1.4 — 2019-02-14
- 0.1.3 — 2019-02-14
- 0.1.2 — 2019-02-14
- 0.1.1 — 2019-02-14

## README

# behaveplus-validate-parms

BehavePlus method parameter validation methods.

# Description

The behaveplus-validate-parms package is used by all the other behaveplus-* packages to ensure the correct number and type of parameters are being passed.  If the espected function signature is not met, an exception is thrown, enforcing the concept of 'fail fast' with respect to programmer errors.

Because constant repetitive parameter validation may impact performance in production environments, each of the behaveplus-* packages contain the following functions:
- enableParamaterValidation()
- disableParameterValidation()

Each behaveplus-* module performs parameter validation by default, and all the test files require parameter validation to occur.  But in well-tested production environments, the client may call [module].disableParameterValidation() to improve performance.

# Methods

- `isNumber(name, value)`
- `isNumberBetween(name, value, minValue, maxValue)`
- `isNumberGe(name, value, minValue)`
- `isNumberGt(name, value, minValue)`
- `isNumberInRange(name, value, minValue, maxValue)`
- `isNumberLe(name, value, maxValue)`
- `isNumberLt(name, value, maxValue)`
- `isString(name, value)`
- `isStringInSet(name, value, setArray)`

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