UNPKG

cleanview

Version:

Clean the content of html articles

19 lines (18 loc) 471 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isComment = isComment; exports.isText = isText; exports.isNode = isNode; exports.isNodeWithChildren = isNodeWithChildren; function isComment(e) { return e.type === "comment"; } function isText(e) { return e.type === "text"; } function isNode(e) { return e.type === "element"; } function isNodeWithChildren(e) { return isNode(e) && e.children && e.children.length > 0; }