Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function evaluate(babel, path, state) {
let result = evaluateSimple(path)
if (result.confident) {
return {
value: compileRule(result.value),
dependencies: [],
}
}
try {
result = evaluateComplex(
path,
babel.types,
state.file.opts.filename,
text => {
return babel.transformSync(text, {
babelrc: false,
filename: state.file.opts.filename,