Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getCode (ast: Node, src: string): string {
const code = generate(ast, {
format: {
quotes: 'double',
escapeless: true,
compact: true
}
});
return src ? removeTrailingSemicolon(code, src) : code;
}