UNPKG

framework7

Version:

Full featured mobile HTML framework for building iOS & Android apps

12 lines 355 B
import htm from 'htm'; import { flattenArray } from '../../shared/utils.js'; const ignoreChildren = [false, null, '', undefined]; const h = (type, props, ...children) => { return { type, props: props || {}, children: flattenArray(children.filter(child => ignoreChildren.indexOf(child) < 0)) }; }; const $h = htm.bind(h); export default $h;