INNER CODE UNIT · JavaScript
isInMode
standard-things/esm · .babel.config.js:28
function isInMode(path) {
const parent = path.find((path) => {
if (path.isClass()) {
return true
}
const isFunc = path.isFunction()
if (! isFunc &&
! path.isProgram()) {
return false
}
const node = isFunc
? path.node.body
: path.node
const { directives } = node