const bopo = require ('hanzi-to-zhuyin'); var i; bopo('我的猫喜欢吃苹果toto').then( x => { i = x; console.log(i); });