mithril-json-tree
v1.0.1
Published
Mithril object viewer component
Downloads
2
Readme
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.