Brooooooklyn / pinyin

rust-pinyin binding for Node.js
https://napi.rs/docs/ecosystem/@napi-rs/pinyin
MIT License
146 stars 9 forks source link

Compare seems not correct #269

Closed AielloChan closed 7 months ago

AielloChan commented 7 months ago
image
import { compare as fastCompare } from '@napi-rs/pinyin';

const a = '你好';
const b = '123';

console.log(fastCompare(a, b), fastCompare(b, a)); // -1 -1
AielloChan commented 7 months ago
compare('饿', '鹅') // -1 Wrong

鹅é、饿è

ē、é、ě、è

So compare('饿', '鹅') need to be 1