1.0.2 • Published 4 years ago

resvelope v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

(Res)ponse En(velope)

=========

Express middleware to automatically wrap responses in an envelope when query parameter envelope (overridable) is true.

{
  "status": 404,
  "data": "Not Found",
  "headers": {...}
}

Usage

$ npm install resvelope --save
var express = require('express');
var app = express();

app.use(require('resvelope')({ //opts }));

Options

  • param: Set this equal to the desired query string parameter which will be used to determine if the response will be wrapped in an envelope. Default: envelope
1.0.2

4 years ago

1.0.1

10 years ago

1.0.0

10 years ago