Neocon Propaganda Machine

    mithril-json-tree

    1.0.1 • Public • Published

    mithril-json-tree

    Mithril object viewer component.

    var m = require('mithril');
    var mjt = require('mithril-json-tree');
     
    var data = {
      foo: 'bar',
    };
     
    m.mount(document.getElementById('app'), {
      view: function (ctrl) {
        return (
          m('div[style="white-space:nowrap"]', [
            m(mjt.MjtValue, { value: data }),
            m(mjt.MjtStyle),
          ])
        );
      },
    });

    See index.html and index.js for another example.

    Install

    npm i mithril-json-tree

    DownloadsWeekly Downloads

    4

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • makepost