blotjson

0.1.7 • Public • Published

blotjson

blotjson is a tool to help you make sense of API responses by displaying JSON in a browser,
directly from backend code where the JSON is received


Why blotjson?

  • There is no need to copy/paste or export your data
  • Everything is done locally on your own computer
  • An arbitrary number of JSON datum can be easily visualised

Installation

npm i --save-dev blotjson

Example

const blot = require('blotjson');

blot.visualise(JSON.stringify(
  { 'bar': null, 'baz': 1.0 }
));

Functions

visualise(jsonStr)

Displays json data in a browser

setPort(customPort)Object

Sets the port of the server to a custom user-defined port

shouldOpenBrowser(bool)Object

Configures whether the browser should open automatically

visualise(jsonStr)

Displays json data in a browser

Kind: global function

Param Type Description
jsonStr String Stringified JSON data to be viewed

setPort(customPort) ⇒ Object

Sets the port of the server to a custom user-defined port

Kind: global function
Returns: Object - Object whose keys point to the blot functions, to allow function chaining

Param Type Description
customPort Number Port which the user wants to use for the network connection between browser and server. Default port of 9101 will be used if not provided by user. Port value must be at least 1024

shouldOpenBrowser(bool) ⇒ Object

Configures whether the browser should open automatically

Kind: global function
Returns: Object - Object whose keys point to the blot functions, to allow function chaining

Param Default Description
bool true Whether the browser should open automatically

Acknowledgements

The design of displaying the data is in part inspired by Swagger

Package Sidebar

Install

npm i blotjson

Weekly Downloads

0

Version

0.1.7

License

MIT

Unpacked Size

34.9 kB

Total Files

7

Last publish

Collaborators

  • arsalanc.v2