terminated
Stored code leaves out a declaration's ;: put it back where the file (or a variable declaration) has one.
export const terminated = (code: string, semicolon: boolean) => (semicolon && !/[;}]\s*$/.test(code) ? `${code};` : code)
Stored code leaves out a declaration's ;: put it back where the file (or a variable declaration) has one.
export const terminated = (code: string, semicolon: boolean) => (semicolon && !/[;}]\s*$/.test(code) ? `${code};` : code)