dom-from
install
npm install --save dom-from
Usage
from dom!
About
dom-from also accepts array like objects. These would be things like a jQuery object, or some other thing that looks like an array with a length property, and numerical indexes.
The full list of normally accepted inputs:
- A string
- Array
- Array like object
- DOM nodes
Everything else is converted to string for your convenience.
Other DOMs
Pass another dom implementation to to second argument of dom-from to override the document.
var obj = ;
This is the same as using the domify module.