Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function transformSourceString (statement) {
if (!Array.isArray(statement)) {
statement = [statement]
}
let result = []
for (let i = 0; i < statement.length; i++) {
let replacement = statement[i]
replacement = babylon.parse(replacement)
replacement = replacement.program.body[0]
result.push(babelTraverse.removeProperties(replacement))
}
return result
}