Skip to content

Instantly share code, notes, and snippets.

@whs
Created December 2, 2019 01:47
Show Gist options
  • Select an option

  • Save whs/c4eab97dd5291a500d9cef0046533a0d to your computer and use it in GitHub Desktop.

Select an option

Save whs/c4eab97dd5291a500d9cef0046533a0d to your computer and use it in GitHub Desktop.
export default function({types: t}){
return {
visitor: {
CallExpression(path) {
const node = path.node
// เช็คว่าเป็น I18n.t จริง
if (
!node.callee.object ||
node.callee.object.name !== 'I18n' ||
node.callee.property.name !== 't'
) {
return
}
console.log('Found I18n.t!!')
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment