Narcissistic Pickle Meister

    domify

    1.4.1 • Public • Published

    domify

    Turn HTML into DOM elements x-browser.

    Usage

    Works out of the box in the browser:

    var domify = require('domify');
    
    document.addEventListener('DOMContentLoaded', function() {
      var el = domify('<p>Hello <em>there</em></p>');
      document.body.appendChild(el);
    });

    You can also run it in node and iojs. Just pass a custom implementation of document:

    var jsdom = require('jsdom').jsdom();
    
    domify('<p>Hello <em>there</em></p>', jsdom.defaultView.document);

    Running tests

    $ npm test
    

    License

    MIT

    Install

    npm i domify

    DownloadsWeekly Downloads

    74,373

    Version

    1.4.1

    License

    MIT

    Unpacked Size

    5.97 kB

    Total Files

    4

    Last publish

    Collaborators

    • coreh
    • swatinem
    • timaschew
    • anthonyshort
    • ianstormtaylor
    • clintwood
    • cristiandouce
    • stagas
    • rauchg
    • kelonye
    • amasad
    • juliangruber
    • thehydroimpulse
    • dominicbarnes
    • dfcreative
    • mattmueller
    • tootallnate
    • yields
    • stephenmathieson
    • retrofox
    • tjholowaychuk
    • hughsk
    • timoxley
    • jongleberry
    • forbeslindesay
    • calvinfo
    • defunctzombie