Reference · Look words up by reading, written form, English meaning, kanji or romaji
studyListTextfunction
A study list as text: csv has a header line and quotes what needs it, for a spreadsheet; tsv has no header and tabs, to paste
into a spreadsheet or to import into a flashcard program. Lines end with a line feed; an empty level or grade is an empty field.
Import it
import { studyListText } from "@johnmorrisdotca/jisho/words";
Definition
function studyListText(rows: readonly StudyRow[], format: "csv" | "tsv"): string
Parameters
| Name | Type | Description |
|---|---|---|
rows | readonly StudyRow[] | From |
format | "csv" | "tsv" |
|
Returns
string
The text, ending in a line feed, or empty for no rows.
Examples
import { studyListText } from "@johnmorrisdotca/jisho/words";
const row = { written: "水", reading: "みず", meaning: "water", level: "N5", grade: 1, count: 1, example: "水" } as const;
console.log(studyListText([row], "csv")); // written,reading,meaning,level,grade,count,example ...written,reading,meaning,level,grade,count,example
水,みず,water,N5,1,1,水What it prints (run when this page was built)