resvelope

1.0.2 • Public • Published

(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

Readme

Keywords

Package Sidebar

Install

npm i resvelope

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

3.89 kB

Total Files

6

Last publish

Collaborators

  • noumansaleem