Reference · Look words up by reading, written form, English meaning, kanji or romaji
studyListfunction
The words of a text that was read, once each in the order they came, each with how often it came and the form it first came in. Unknown stretches and things that are not Japanese are not words and are left out.
Import it
import { studyList } from "@johnmorrisdotca/jisho/words";
Definition
function studyList(result: ReadResult, options?: { readonly kanjiOnly?: boolean; }): StudyRow[]
Parameters
| Name | Type | Description |
|---|---|---|
result | ReadResult | What |
options (optional) | { readonly kanjiOnly?: boolean; } |
|
Returns
StudyRow[]
The rows.
Examples
import { readText, studyList } from "@johnmorrisdotca/jisho/words";
const rows = studyList(await readText("食べた。食べない。"));
console.log(rows.map((row) => `${row.written} ${row.count}`)); // ["食べる 2"][ '食べる 2' ]What it prints (run when this page was built)