html-stringify

0.0.3 • Public • Published

html-stringify

Converts Javascript Objects or Arrays to pretty HTML string for rendering in a browser.

Usage

Available as an npm module:

npm install html-stringify

Then:

var htmlStringify = require('html-stringify');

var myObj = {
  str: 'It formats strings, numbers, booleans and dates',
  bool: true,
  date: new Date(),
  num: 42,
  arr: [
    'And nested arrays / objects',
    {
      key: 'value'
    }
  ]
};

var output = htmlStringify(myObj);

For a client-side implementation, see react-domify

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    1,078
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    1,078
  • 0.0.2
    1
  • 0.0.1
    1

Package Sidebar

Install

npm i html-stringify

Weekly Downloads

1,080

Version

0.0.3

License

MIT

Last publish

Collaborators

  • jedwatson