Reference · The functions that read the tables
kanjiInfunction
The kanji in a piece of text, once each, in the order they first appear.
Import it
import { kanjiIn } from "@johnmorrisdotca/jisho";
Definition
function kanjiIn(text: string): string[]
Parameters
| Name | Type | Description |
|---|---|---|
text | string | Any text. |
Returns
string[]
The kanji in it; kana, Latin letters and punctuation are left out.
Examples
import { kanjiIn } from "@johnmorrisdotca/jisho";
console.log(kanjiIn("日本語を日本で")); // ["日", "本", "語"][ '日', '本', '語' ]What it prints (run when this page was built)