import { Observable, Observer } from 'rxjs'; const tidy = require('tidy-html5').tidy_html5; const options = { 'indent-spaces': 2, 'output-html': true, 'uppercase-attributes': true }; function _tidy(aHtml: string): Observable { return Observable.create((o: Observer) => { /* tidy(aHtml, options, (error: Error, value: string) => { if (error) { o.error(error); } else { o.next(value); o.complete(); } });*/ o.next(aHtml); o.complete(); }); } export { _tidy as rxTidy };