Nattily Polished Marbles
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    html-stringifypublic

    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

    install

    npm i html-stringify

    Downloadsweekly downloads

    2,860

    version

    0.0.3

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar