0.0.3 • Published 7 years ago

html-to-inferno v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

html-to-inferno

Build Status

Description

A small library to convert HTML into Inferno's VNodes.

Status

The library is under development. API might vary a little bit.

Example

import createFromHTML from 'html-to-inferno';

createFromHTML('<div>hello!</div>'); // yields single VNode

createFromHTML(
  '<div>hello</div><div>world!</div>'
, {multipleNodes: true}
); // yields array of two VNodes

createFromHTML(
  '<div>hello</div>'
, {preprocess: n => ({name: 'p', props: n.props, children: n.children})
); // yields p-VNode instead of div-VNode

See also