Skip to content

Commit

Permalink
Add docs for typed add kanji
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvNC committed Jul 7, 2024
1 parent 6ff5517 commit 0bc6df8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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('')
Expand Down

0 comments on commit 0bc6df8

Please sign in to comment.