From 0bc6df81967f6f625f60b040e5896dbee552fb11 Mon Sep 17 00:00:00 2001 From: MarvNC Date: Sat, 6 Jul 2024 21:18:46 -0700 Subject: [PATCH] Add docs for typed add kanji --- readme.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/readme.md b/readme.md index f69d0ff..c480b11 100644 --- a/readme.md +++ b/readme.md @@ -119,6 +119,21 @@ await dictionary.addTerm(entry2); Kanji entries can be added using the `addKanji()` method: ```javascript +dictionary.addKanji({ + kanji: '読', + kunyomi: 'あ', + onyomi: 'ア', + meanings: ['Asia'], + stats: { + strokes: '7', + grade: '8', + }, +}); +dictionary.addKanji({ + kanji: '詠', +}); + +// Alternatively, create a KanjiEntry object first const { KanjiEntry } = require('yomichan-dict-builder'); const kanjiEntry = new KanjiEntry('亜') .setKunyomi('あ')