Skip to content

Instantly share code, notes, and snippets.

@bitttttten
Last active July 17, 2019 11:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bitttttten/1f00c45269c445ae48f4aa789a8b547c to your computer and use it in GitHub Desktop.
Save bitttttten/1f00c45269c445ae48f4aa789a8b547c to your computer and use it in GitHub Desktop.
export default function Example() {
const { t } = useTranslation('home')
return (
<span>{t('what is this value')}</span>
)
}
// for example, i can get the function name:
node.children[0].expression.callee.name === 't' // true
// however, arguments is just an empty array
node.children[0].expression.arguments // []
node.children[0].expression.arguments.length === 0 // true
node.children[0].expression.start // 206
node.children[0].expression.end // 209
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment