Reference · The functions that read the tables
lookAlikesfunction
The kanji most like one kanji, the closest first.
Import it
import { lookAlikes } from "@johnmorrisdotca/jisho";
Definition
function lookAlikes(table: PackedLookAlikes, kanji: string, options?: LookAlikeOptions): LookAlike[]
Parameters
| Name | Type | Description |
|---|---|---|
table | PackedLookAlikes |
|
kanji | string | One kanji. |
options (optional) | LookAlikeOptions | How low to go and how many to give back. |
Returns
LookAlike[]
The kanji that look like it; none when none reaches the score. None does not say a kanji has no look-alike: Yencken's two measures cover only the 1,945 jōyō kanji of before 2010, and the shape scores that make up for it keep only the nearest.
Examples
import { lookAlikes } from "@johnmorrisdotca/jisho";
import { LOOK_ALIKE } from "@johnmorrisdotca/jisho/look-alike";
console.log(lookAlikes(LOOK_ALIKE, "土").map((one) => one.kanji));[ '工', '士', '里', '王', '五' ]What it prints (run when this page was built)