1.1.0 • Published 10 years ago

dom-clean v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

Dom Clean

Simple dom utility to strip comments from a dom tree and removes empty blank spaces.

To ensure traversing will only meet ELEMENT_NODEs or TEXT_NODEs.

Usage:

var DomClean = require('dom-clean').clean;
var el = document.body;
DomClean(el);

If you want to keep the comments use:

DomClean(el, true);

Test:

testem