Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
get text() {
if (!('_text' in this)) {
var parseTree = this._parseTree;
if (parseTree) {
var outputStream = uglifyJs.OutputStream({
// Preserve all comments when isPretty is true, and only preserve copyright notices/license info
// when it's false:
comments: this.isPretty || shouldCommentNodeBePreservedInNonPrettyPrintedOutput,
beautify: this.isPretty,
quote_char: this.quoteChar,
source_map: null
});
parseTree.print(outputStream);
var text = outputStream.get();
if (text.length > 0) {
text = text.replace(/;*$/, ';'); // Always end with a semicolon like the UglifyJS binary (if non-empty)
}
// Workaround for https://github.com/mishoo/UglifyJS2/issues/180
if (parseTree.end && parseTree.end.comments_before && !parseTree.end._comments_dumped) {