popsicle-status
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

Popsicle Status

NPM version NPM downloads Build status Test coverage

Popsicle middleware for rejecting responses with bad HTTP statuses.

Installation

npm install popsicle-status --save

Usage

import { status } from "popsicle-status";
 
const middleware = status();
 
const res = await middleware(req, send);

status(min?: number, max?: number)

Default status codes of min 200 (inclusive) and max 400 (exclusive).

TypeScript

This project is written using TypeScript and publishes the definitions directly to NPM.

License

MIT

Package Sidebar

Install

npm i popsicle-status

Weekly Downloads

34,379

Version

3.0.0

License

MIT

Unpacked Size

12.2 kB

Total Files

9

Last publish

Collaborators

  • blakeembrey