UNPKG

babel-plugin-transform-me-module

Version:

Transform me.js module to commonjs module

17 lines (13 loc) 580 B
import {get} from 'lodash'; export const isProvideFunctionCall = node => get(node, 'callee.property.name') === 'provide' && ( get(node, 'callee.object.callee.object.name') === 'me' || get(node, 'callee.object.name') === 'me' ); export const isReadyFunctionCall = node => get(node, 'callee.property.name') === 'ready' && get(node, 'callee.object.name') === 'exports'; export const isEvalFunctionCall = node => get(node, 'callee.name') === 'eval' && get(node, 'arguments.0.callee.property.name') === 'extract';