Kanji
漢字 object
Kanji character object
// Kanji character object example
{
freq: 1,
grade: 1,
jlpt: 4,
kunyomi: ['ひ', '-び', '-か'],
literal: '日',
meanings: ['day', 'sun', 'Japan', 'counter for days'],
onyomi: ['ニチ', 'ジツ'],
stroke_count: 4
}
Methods
Kanji class methods
Return type: object
Gets the details of the 漢字 character and returns it. If the character
was not found on the dictionary, this returns null
.
Return type: object[]
Searches the entire dictionary file for words that matches the options.
// Available options
{
jlpt: 1,
grade: 1,
romaji: 'hi',
meaning: 'counter for days',
sort: true // Enable sorting by best matches; default: true
}
// You can also search jlpt and/or grade by specifying `min` and `max`
{
jlpt: {
min: 1,
max: 2
},
grade: {
min: 1,
max: 2
},
romaji: 'hi',
meaning: 'counter for days',
sort: true
}
Return type: object
Returns a random 漢字 character.