UNPKG

halvalla

Version:

Generate React elements with CoffeeScript functions

48 lines (39 loc) 1.06 kB
// Generated by CoffeeScript 1.12.7 (function() { var Component, Halvalla, Mithril, Oracle; Mithril = require('mithril'); Oracle = { summoner: Mithril, name: 'Mithril', Component: Component = (function() { function Component(vnode) { var key, value; for (key in vnode) { value = vnode[key]; this.key = value; } return null; } return Component; })(), createElement: Mithril, preInstantiate: true, getChildren: function(element) { return element.children; }, getProp: function(element) { return element.attrs; }, propertyName: 'attrs', getName: function(element) { var ref; return ((ref = element._Halvalla) != null ? ref.tagName : void 0) || element.tagName || element.tag; }, trust: function(text) { return Mithril.trust(text); } }; Halvalla = require('../lib/halvalla').Halvalla; module.exports = (new Halvalla(Oracle)).tags(); module.exports.Halvalla = Halvalla; }).call(this);