# typeforce-middleware

> Typeforce, applied as a connect middleware. Strict by default.

Latest version **2.1.0** (published 2018-09-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install typeforce-middleware
pnpm add typeforce-middleware
yarn add typeforce-middleware
bun add typeforce-middleware
```

## 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 | 2.1.0 |
| Published | 2018-09-10 |
| First published | 2015-11-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Daniel Cousens |
| Maintainers | dcousens |
| Keywords | express, middleware, typeforce, types, typechecking, type, exceptions, force |

## Links

- npm: https://www.npmjs.com/package/typeforce-middleware
- Repository: https://github.com/dcousens/typeforce-middleware
- Issues: https://github.com/dcousens/typeforce-middleware/issues
- npm.io page: https://npm.io/package/typeforce-middleware

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 2.1.0 (latest) — 2018-09-10
- 2.0.1 — 2016-12-07
- 2.0.0 — 2015-11-12
- 1.0.2 — 2015-11-09
- 1.0.1 — 2015-11-09
- 1.0.0 — 2015-11-09

## README

# typeforce-middleware

[![build status](https://secure.travis-ci.org/dcousens/typeforce-middleware.png)](http://travis-ci.org/dcousens/typeforce-middleware)
[![Version](http://img.shields.io/npm/v/typeforce-middleware.svg)](https://www.npmjs.org/package/typeforce-middleware)


Typeforce applied as a connect middleware.
Strictness is enabled by default.

## Examples

``` javascript
var express = require('express')
var bodyParser = require('body-parser')
var typeforce = require('typeforce-middleware')
var app = express()

app.post('/comment', bodyParser.json(), typeforce({
	title: 'String',
	content: 'String'
}), function (req, res) {
	res.status(200).end()
}, function (err, req, res, next) {
	res.status(400).end(err.message)
})
```

## LICENSE [MIT](LICENSE)

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