Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

似乎发生了一些非预期的行为 #244

Open
Vinlic opened this issue Sep 3, 2023 · 2 comments
Open

似乎发生了一些非预期的行为 #244

Vinlic opened this issue Sep 3, 2023 · 2 comments

Comments

@Vinlic
Copy link

Vinlic commented Sep 3, 2023

const words = await asyncPinyin("中心", {
segment: true
});
console.log(words); // [ 'zhong', 'zhong', 'xin', 'xin' ]

我会获得以上结果,平台是arm64,当前模块版本是1.7.3。

@AielloChan
Copy link
Contributor

Same in v1.7.3

@xioxin
Copy link

xioxin commented May 18, 2024

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' ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants