# params-integrity

> Lite param checker with simplicity and promises in mind. Easilly checks mandatory fields / keys / values of an object. Aimed a ease Rest API parameter checking.

Latest version **0.2.5** (published 2016-02-02) · GPL-2.0 license · 0 weekly downloads

## Install

```sh
npm install params-integrity
pnpm add params-integrity
yarn add params-integrity
bun add params-integrity
```

## 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.5 |
| Published | 2016-02-02 |
| First published | 2015-09-29 |
| Weekly downloads | 0 |
| License | GPL-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Johan Leche |
| Maintainers | zelearner |
| Keywords | validator, parameters, rest, integrity, test |

## Links

- npm: https://www.npmjs.com/package/params-integrity
- Repository: https://github.com/ezeeworld/npm-params-integrity
- Issues: https://github.com/ezeeworld/npm-params-integrity/issues
- npm.io page: https://npm.io/package/params-integrity

## Dependencies (2)

- [q](https://npm.io/package/q.md) ^1.4.1
- [lodash](https://npm.io/package/lodash.md) ^3.10.1

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 0.2.5 (latest) — 2016-02-02
- 0.2.4 — 2015-11-26
- 0.2.3 — 2015-11-26
- 0.2.2 — 2015-09-30
- 0.2.1 — 2015-09-29
- 0.2.0 — 2015-09-29
- 0.1.1 — 2015-09-29
- 0.1.0 — 2015-09-29
- 0.0.2 — 2015-09-29
- 0.0.1 — 2015-09-29

## README

**params-integrity**

[![npm version](https://badge.fury.io/js/params-integrity.svg)](http://badge.fury.io/js/params-integrity)

Performs basic presence-checking of a list of keys from an object.

*Install via npm*
```
npm install params-integrity
```


*Basic usage*

```javascript
var paramsIntegrity = require("params-integrity");

// example object to be checked
var objectToCheck = {
    parameter1: "lorem",
    parameter2: "ipsum",
    parameter3: "sit"
};

paramsIntegrity.checkRequiredParams([
        'parameter1',
        'parameter2',
        'parameter3',
    ], objectToCheck)
    .then(function(validatedParams){
        // do what you want with the validatedParams
    })
    .catch(function(error){
        // perform error handling here
    });
```

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