Open Vinlic opened 1 year ago
Same in v1.7.3
1.7.5 问题仍然存在
Welcome to Node.js v14.18.1.
Type ".help" for more information.
> const { asyncPinyin, pinyin } = require("@napi-rs/pinyin");
undefined
> pinyin('年龄', { segment: true})
[ 'nian', 'ling' ]
> asyncPinyin('年龄', { segment: true}).then(v => console.log(v))
Promise {
<pending>,
[Symbol(async_id_symbol)]: 539,
[Symbol(trigger_async_id_symbol)]: 537,
[Symbol(destroyed)]: { destroyed: false }
}
> [ 'nian', 'nian', 'ling', 'ling' ]
const words = await asyncPinyin("中心", { segment: true }); console.log(words); // [ 'zhong', 'zhong', 'xin', 'xin' ]
我会获得以上结果,平台是arm64,当前模块版本是1.7.3。