Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}) : defaultPass;
post = parsed.post ? parsed.post.map(function (name) {
return esmangle.pass.require('post/' + name);
}) : defaultPost;
options = parsed.options ? parsed.options : {};
rawCheck = parsed.raw == null ? true : parsed.raw === raw;
return true;
}
} catch (e) { }
return false;
});
if (!rawCheck) {
return;
}
tree = doOptimize(tree, pass, post, options);
formatOptions = clone(escodegen.FORMAT_MINIFY);
formatOptions.escapeless = false;
actual = escodegen.generate(tree, {
format: formatOptions,
directive: true,
raw: raw
});
expect(actual).to.be.equal(expected);
}
directive: true,
preserveCompletionValue: argv.preserveCompletionValue,
legacy: !argv.nonLegacy,
topLevelContext: argv.topLevelContext,
inStrictCode: argv.inStrictCode
});
tree = esmangle.mangle(tree, {
destructive: true,
distinguishFunctionExpressionScope: false
});
if (propagateLicenseComment) {
tree.leadingComments = licenses;
}
formatOption = common.deepCopy(escodegen.FORMAT_MINIFY);
formatOption.indent.adjustMultilineComment = true;
return escodegen.generate(tree, {
format: formatOption,
sourceMap: argv.sourceMap && filename,
directive: true,
comment: preserveLicenseComment || propagateLicenseComment
});
}