Reference · The functions that read the tables
PackedLookAlikestype
The shape of LOOK_ALIKE, from @johnmorrisdotca/jisho/look-alike.
Import it
import type { PackedLookAlikes } from "@johnmorrisdotca/jisho";
Definition
type PackedLookAlikes = {
readonly source: string;
readonly pairs: readonly (readonly [
string,
number,
number
] | readonly [
string,
number,
number,
number
])[];
};
Members
| Name | Type | Description |
|---|---|---|
source | string | Whose scores they are. |
pairs | readonly (readonly [string, number, number] | readonly [string, number, number, number])[] | The two kanji written together, then the score by strokes and the score by parts, each out of 100, 0 where not scored, and the score by shape where there is one (the pairs the first two did not hold). |
Examples
import type { PackedLookAlikes } from "@johnmorrisdotca/jisho";
const packed: PackedLookAlikes = { source: "a study", pairs: [["士土", 100, 67], ["己巳", 0, 0, 84]] };
console.log(packed.pairs.length);2What it prints (run when this page was built)