Socket
Socket
Sign inDemoInstall

express-prettify

Package Overview
Dependencies
0
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    express-prettify

express middleware to send pretty printed json


Version published
Weekly downloads
5.6K
decreased by-7.13%
Maintainers
1
Install size
5.33 kB
Created
Weekly downloads
 

Readme

Source

express-prettify

NPM Version NPM Downloads Build Status Coverage Status Code Climate Known Vulnerabilities

express middleware to send pretty printed json

Install

$ npm install express-prettify

Examples

"use strict";

var app = require('express')();
var pretty = require('express-prettify');

app.use(pretty({ query: 'pretty' }));

app.get('/', function(req, res) {
  res.json({ hello: 'world', body: 'This is pretty printed json' });
});

app.listen(3000);
$ node app.js &

$ curl http://localhost:3000?pretty
{
  "hello": "world",
  "body": "This is pretty printed json"
}

$ curl http://localhost:3000
{ "hello": "world", "body": "This is pretty printed json" }

License

MIT

Keywords

FAQs

Last updated on 28 Mar 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc