Skip to the content

Hikidashi引き出し

Era dates (和暦) and kanji numerals both ways, the dictionary forms of a conjugated word, a reading shared out over its kanji, words pulled from pasted text, and how hard a sentence is to read.

Hikidashi (引き出し) is a drawer: each tool is pulled out when it is wanted. About the name

Contents

Reference · Sentence difficulty

kanjiInfunction

Every kanji in the text, once each, in the order they appear. Kana, punctuation and 々 are not kanji.

Import it

import { kanjiIn } from "@johnmorrisdotca/hikidashi/difficulty";

Also exported from: @johnmorrisdotca/hikidashi

Definition

function kanjiIn(text: string): string[]

Parameters

NameTypeDescription
textstring

Any text.

Returns

string[]

The distinct kanji (CJK Unified Ideographs and Extension A), first appearance first; an empty list when there are none.

Examples

import { kanjiIn } from "@johnmorrisdotca/hikidashi/difficulty";

console.log(kanjiIn("毎日、日本語を勉強する。"), kanjiIn("ひらがな"));
[ '毎', '日', '本', '語', '勉', '強' ] []

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hikidashi 1.1.0.