You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

express-prettify

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-prettify

express middleware to send pretty printed json

0.1.2
latest
Source
npmnpm
Version published
Weekly downloads
10K
0.41%
Maintainers
1
Weekly downloads
 
Created
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

express

FAQs

Package last updated on 28 Mar 2022

Did you know?

Socket

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.