Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
translateText() {
try{
translate(this.text, { to: this.translateTo }).then(res => {
this.translatedText = res.text;
});
}catch(e){
console.error(e);
}
},
async function words(q, params) {
return translate(q, { ...params })
.then(res => res.text)
.catch(err => log.error(err));
}