Reference · The functions that read the tables
LookAliketype
A kanji that looks like another, and how much.
Import it
import type { LookAlike } from "@johnmorrisdotca/jisho";
Definition
type LookAlike = {
readonly kanji: string;
readonly score: number;
readonly strokes: number;
readonly parts: number;
readonly shape: number;
};
Members
| Name | Type | Description |
|---|---|---|
kanji | string | The kanji it looks like. |
score | number | The highest of the scores, out of 100. |
strokes | number | Out of 100, by how few stroke edits separate them; 0 where this measure did not rank the pair. |
parts | number | Out of 100, by the parts they share; 0 where this measure did not rank the pair. |
shape | number | Out of 100, by how alike their strokes are drawn (KanjiVG); 0 where the pair has no such score. |
Examples
import type { LookAlike } from "@johnmorrisdotca/jisho";
const one: LookAlike = { kanji: "士", score: 100, strokes: 100, parts: 67, shape: 0 };
console.log(one.kanji);士What it prints (run when this page was built)