# connect-requirements

> Require specific keys in request.

Latest version **0.0.3** (published 2013-12-31) · 0 weekly downloads

## Install

```sh
npm install connect-requirements
pnpm add connect-requirements
yarn add connect-requirements
bun add connect-requirements
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2013-12-31 |
| First published | 2013-12-30 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Alex Zlotnik |
| Maintainers | zlotnika |

## Links

- npm: https://www.npmjs.com/package/connect-requirements
- Repository: git@github.com:zlotnika/connect-requirements
- Homepage: https://github.com/zlotnika/connect-requirements
- Issues: https://github.com/zlotnika/connect-requirements/issues
- npm.io page: https://npm.io/package/connect-requirements

## Recent versions

- 0.0.3 (latest) — 2013-12-31
- 0.0.2 — 2013-12-30
- 0.0.1 — 2013-12-30

## README

connect-requirements
====================

Require specific keys in request.

Usage
-----

```JavaScript
var http = require('http')
var connect = require('connect')
var requirements = require('connect-requirements')

var app = connect()

// make sure the objects are added to the request before the request is checked for requirements
    .use(connect.query())
    .use(connect.bodyParser())


// you can specify any objects within the request to check for keys
    .use(requirements({ query: 'foo' }))
    .use(requirements({ body: ['bar', 'foobar'] }))

    .use(function(req, res){
        res.end('hello world\n');
    })

http.createServer(app).listen(3000);
```

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