unfold-json

1.0.2 • Public • Published

Unfold json

This module is used to show json on website.

Use

  import UnfoldJson from 'unfold-json';

  let data = {"key":"value","items":[{"key":"value"},{"key":"value"}]}
  document.getElementById("data").innerHTML = UnfoldJson(JSON.stringify(data));

and you can show this json on your website like this:

  {
      "key": "value",
      "items": [
          {
              "key": "value"
          },
          {
              "key": "value"
          }
      ]
  }

I usees6, but you can also use require to import module.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    2
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i unfold-json

Weekly Downloads

2

Version

1.0.2

License

MIT

Last publish

Collaborators

  • hsuting