node_modules/hastscript/index.js
/* Hyperscript compatible DSL for creating virtual HAST
 * trees. */
Hyperscript compatible DSL for creating virtual HAST
trees.
Hyperscript compatible DSL for creating virtual HAST trees .
function h(selector, properties, children) {
  var node = parseSelector(selector);
  var property;
  if (
    properties &&
    !children &&
    (
      typeof properties === 'string' ||
      'length' in properties ||
      isNode(node.tagName, properties)
    )
  ) {
    children = properties;
    properties = null;
  }
  if (properties) {
    for (property in properties) {
      addProperty(node.properties, property, properties[property]);
    }
  }
  addChild(node.children, children);
  if (node.tagName === 'template') {
    node.content = {type: 'root', children: node.children};
    node.children = [];
  }
  return node;
}
function h ( selector , properties , children ) { var node = parseSelector ( selector ) ; var property ; if ( properties && ! children && ( typeof properties === 'string' || 'length' in properties || isNode ( node . tagName , properties ) ) ) { children = properties ; properties = null ; } if ( properties ) { for ( property in properties ) { addProperty ( node . properties , property , properties [ property ] ) ; } } addChild ( node . children , children ) ; if ( node . tagName === 'template' ) { node . content = { type : 'root' , children : node . children } ; node . children = [ ] ; } return node ; }
Hyperscript compatible DSL for creating virtual HAST
 trees.
Hyperscript compatible DSL for creating virtual HAST trees .