GoScrobble/web/node_modules/dom-helpers/cjs/childNodes.js

16 lines
345 B
JavaScript
Raw Permalink Normal View History

2022-04-25 02:47:15 +00:00
"use strict";
exports.__esModule = true;
exports.default = childNodes;
var toArray = Function.prototype.bind.call(Function.prototype.call, [].slice);
/**
* Collects all child nodes of an element.
*
* @param node the node
*/
function childNodes(node) {
return node ? toArray(node.childNodes) : [];
}
module.exports = exports["default"];