0.1.7 • Published 4 years ago
blotjson v0.1.7
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
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