It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
82%
Published
2 years ago (0.1.2)
YXM
YXM(音形码),一种比较汉字相似性的算法。
Examples
first new a ts file named test.ts.
import { YXM, cmpWordYxm } from "jsr:@xtool/yxm"; console.log(YXM); console.log(cmpWordYxm('新', '新')); // 11 console.log(cmpWordYxm('船', '传')); // 9.571428571428571 console.log(cmpWordYxm('固', '国')); // 6.464285714285714 console.log(cmpWordYxm('体', '休')); // 4.107142857142858 console.log(cmpWordYxm('强', '门')); // 1.25
then run the below command:
# run the test.ts $ deno run test.ts
Add Package
deno add jsr:@xtool/yxm
Import symbol
import * as yxm from "@xtool/yxm";
Import directly with a jsr specifier
import * as yxm from "jsr:@xtool/yxm";
Add Package
pnpm i jsr:@xtool/yxm
pnpm dlx jsr add @xtool/yxm
Import symbol
import * as yxm from "@xtool/yxm";
Add Package
yarn add jsr:@xtool/yxm
yarn dlx jsr add @xtool/yxm
Import symbol
import * as yxm from "@xtool/yxm";
Add Package
vlt install jsr:@xtool/yxm
Import symbol
import * as yxm from "@xtool/yxm";
Add Package
npx jsr add @xtool/yxm
Import symbol
import * as yxm from "@xtool/yxm";
Add Package
bunx jsr add @xtool/yxm
Import symbol
import * as yxm from "@xtool/yxm";