# assert-keys

> assert an object has some keys

Latest version **1.0.0** (published 2013-09-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install assert-keys
pnpm add assert-keys
yarn add assert-keys
bun add assert-keys
```

## 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.0 |
| Published | 2013-09-30 |
| First published | 2013-09-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jon Packer |
| Maintainers | jonpacker |
| Keywords | assert, keys, exist, config |

## Links

- npm: https://www.npmjs.com/package/assert-keys
- Repository: http://github.com/jonpacker/assert-keys
- npm.io page: https://npm.io/package/assert-keys

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2013-09-30

## README

# assert-keys

asserts that some keys are present in an object

## install

```
npm i assert-keys
```

## example

```javascript
var checkConfig = require('assert-keys')(['port', 'api_url']);

checkConfig({port: 8000, api_url: 'http://localhost:1234'}); // doesn't throw
checkConfig({port: 8000}); // throws!
```

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