UNPKG

decca

Version:

Render interfaces using pure functions and virtual DOM, kinda

15 lines (11 loc) 344 B
"use strict"; /* * Returns a vnode to be consumed by render() */ function element(tag, props) { for (var _len = arguments.length, children = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { children[_key - 2] = arguments[_key]; } return { tag: tag, props: props, children: children }; } module.exports = element;