Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

html-json-highlight

lZiMUl43Apache-2.01.1.1

Html Json Highlight

lZiMUl, WebSite, Json, Highlight, Koa, Express, Web, Http

readme

Welcome to Html Json Highlight

Browser Support

Chrome Firefox Safari Opera Edge IE
Latest ✔ Latest ✔ Latest ✔ Latest ✔ Latest ✔ 11 ✔

Install Command:

npm install html-json-highlight --save

Use Module

import HtmlJsonHighlight from 'html-json-highlight';

const Demo = new HtmlJsonHighlight({
    string: 'hello',
    number: 123,
    boolean: true,
    object: {
        string: 'world',
        number: 321,
        false
    },
    array: [
        'lZiMUl',
        258,
        true
    ],

});

// Simulator koa Route
Route.get('/', async socket => {
    socket.status = 200;
    socket.type = 'text/html';
    socket.response.body =  await Demo.body(false);
})