first-child-shim
v2.0.3
Published
Shim for retrieving firstChild in a node environment.
Downloads
14
Readme
first-child-shim
Shims firstChild method in a node environment if it is missing.
Install
npm i first-child-shim
Usage
var firstChildShim = require('first-child-shim')
var html = require('bel')
var element = firstChildShim(html`<ul><li>FOMO</li><li>YOLO</li></ul>`)
var firstKid = element.firstChild() // returns <li>FOMO</li>
Test
npm test