Skip to main content
Home

@xtool/yxm@0.1.2

latest
It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with 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

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@xtool/yxm

Import symbol

import * as yxm from "@xtool/yxm";
or

Import directly with a jsr specifier

import * as yxm from "jsr:@xtool/yxm";

Add Package

pnpm i jsr:@xtool/yxm
or (using pnpm 10.8 or older)
pnpm dlx jsr add @xtool/yxm

Import symbol

import * as yxm from "@xtool/yxm";

Add Package

yarn add jsr:@xtool/yxm
or (using Yarn 4.8 or older)
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";