henkan 2.0.4 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +789 -736
- package/dist/index.cjs.js.map +3 -3
- package/dist/index.mjs +781 -730
- package/dist/index.mjs.map +3 -3
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/types.d.ts +93 -19
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils.d.ts +55 -28
- package/dist/types/utils.d.ts.map +1 -1
- package/docs/api/README.md +12 -1
- package/docs/api/functions/capitalizeString.md +1 -1
- package/docs/api/functions/convertJMdict.md +1 -1
- package/docs/api/functions/convertJawiktionaryAsync.md +1 -1
- package/docs/api/functions/convertJawiktionarySync.md +1 -1
- package/docs/api/functions/convertKanjiDic.md +1 -1
- package/docs/api/functions/convertKradFile.md +1 -1
- package/docs/api/functions/convertRadkFile.md +1 -1
- package/docs/api/functions/convertTanakaCorpus.md +1 -1
- package/docs/api/functions/convertTanakaCorpusWithFurigana.md +1 -1
- package/docs/api/functions/createEntryMaps.md +59 -0
- package/docs/api/functions/generateAnkiNote.md +1 -1
- package/docs/api/functions/generateAnkiNotesFile.md +1 -1
- package/docs/api/functions/getKanji.md +10 -10
- package/docs/api/functions/getKanjiExtended.md +8 -8
- package/docs/api/functions/getValidForms.md +39 -0
- package/docs/api/functions/getWord.md +11 -11
- package/docs/api/functions/getWordDefinitions.md +1 -1
- package/docs/api/functions/getWordDefinitionsWithFurigana.md +1 -1
- package/docs/api/functions/isObjectArray.md +27 -0
- package/docs/api/functions/isStringArray.md +2 -2
- package/docs/api/functions/isValidArrayWithFirstElement.md +2 -2
- package/docs/api/functions/shuffleArray.md +1 -1
- package/docs/api/interfaces/DefaultNoteInfo.md +4 -4
- package/docs/api/interfaces/Definition.md +4 -4
- package/docs/api/interfaces/DictKanji.md +5 -5
- package/docs/api/interfaces/DictKanjiForm.md +4 -4
- package/docs/api/interfaces/DictKanjiMisc.md +5 -5
- package/docs/api/interfaces/DictKanjiReading.md +3 -3
- package/docs/api/interfaces/DictKanjiReadingMeaning.md +3 -3
- package/docs/api/interfaces/DictKanjiReadingMeaningGroup.md +3 -3
- package/docs/api/interfaces/DictKanjiWithRadicals.md +3 -3
- package/docs/api/interfaces/DictMeaning.md +15 -15
- package/docs/api/interfaces/DictRadical.md +4 -4
- package/docs/api/interfaces/DictReading.md +5 -5
- package/docs/api/interfaces/DictWord.md +9 -9
- package/docs/api/interfaces/EntryMaps.md +83 -0
- package/docs/api/interfaces/ExamplePart.md +8 -8
- package/docs/api/interfaces/GlossSpecificNumber.md +4 -4
- package/docs/api/interfaces/Grammar.md +15 -15
- package/docs/api/interfaces/GrammarMeaning.md +3 -3
- package/docs/api/interfaces/JaWiktionaryEntry.md +8 -20
- package/docs/api/interfaces/Kana.md +11 -11
- package/docs/api/interfaces/Kanji.md +24 -24
- package/docs/api/interfaces/KanjiComponent.md +3 -3
- package/docs/api/interfaces/KanjiForm.md +4 -4
- package/docs/api/interfaces/NoteAndTag.md +3 -3
- package/docs/api/interfaces/NoteHeaderKeys.md +7 -7
- package/docs/api/interfaces/Phrase.md +5 -5
- package/docs/api/interfaces/Radical.md +16 -16
- package/docs/api/interfaces/Reading.md +5 -5
- package/docs/api/interfaces/ReadingsKanjiFormsPair.md +31 -0
- package/docs/api/interfaces/ResultEntry.md +7 -7
- package/docs/api/interfaces/TanakaExample.md +7 -7
- package/docs/api/interfaces/Translation.md +3 -3
- package/docs/api/interfaces/UsefulRegExps.md +8 -8
- package/docs/api/interfaces/Word.md +15 -15
- package/docs/api/interfaces/WordDefinitionPair.md +4 -4
- package/docs/api/type-aliases/Dict.md +1 -1
- package/docs/api/type-aliases/DictTranslation.md +1 -1
- package/docs/api/type-aliases/EntryType.md +1 -1
- package/docs/api/type-aliases/KanjiEntryMap.md +13 -0
- package/docs/api/type-aliases/KanjiSVGMap.md +13 -0
- package/docs/api/type-aliases/KanjiWordsMap.md +13 -0
- package/docs/api/type-aliases/Result.md +1 -1
- package/docs/api/type-aliases/StringNumber.md +13 -0
- package/docs/api/type-aliases/WordDefinitionsMap.md +13 -0
- package/docs/api/type-aliases/WordExamplesMap.md +13 -0
- package/docs/api/type-aliases/WordIDEntryMap.md +13 -0
- package/package.json +4 -4
- package/docs/api/functions/isValidArray.md +0 -27
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: Reading
|
|
8
8
|
|
|
9
|
-
Defined in: [types.ts:
|
|
9
|
+
Defined in: [types.ts:647](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L647)
|
|
10
10
|
|
|
11
11
|
A reading of the word
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ Converted from [DictReading](DictReading.md)
|
|
|
18
18
|
|
|
19
19
|
> `optional` **audio**: `string`
|
|
20
20
|
|
|
21
|
-
Defined in: [types.ts:
|
|
21
|
+
Defined in: [types.ts:663](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L663)
|
|
22
22
|
|
|
23
23
|
The filename of an audio file for the reading
|
|
24
24
|
|
|
@@ -28,7 +28,7 @@ The filename of an audio file for the reading
|
|
|
28
28
|
|
|
29
29
|
> `optional` **common**: `true`
|
|
30
30
|
|
|
31
|
-
Defined in: [types.ts:
|
|
31
|
+
Defined in: [types.ts:659](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L659)
|
|
32
32
|
|
|
33
33
|
Whether or not the reading is common
|
|
34
34
|
|
|
@@ -38,7 +38,7 @@ Whether or not the reading is common
|
|
|
38
38
|
|
|
39
39
|
> `optional` **notes**: `string`[]
|
|
40
40
|
|
|
41
|
-
Defined in: [types.ts:
|
|
41
|
+
Defined in: [types.ts:655](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L655)
|
|
42
42
|
|
|
43
43
|
Optional notes for the reading
|
|
44
44
|
|
|
@@ -48,6 +48,6 @@ Optional notes for the reading
|
|
|
48
48
|
|
|
49
49
|
> `readonly` **reading**: `string`
|
|
50
50
|
|
|
51
|
-
Defined in: [types.ts:
|
|
51
|
+
Defined in: [types.ts:651](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L651)
|
|
52
52
|
|
|
53
53
|
The reading (in kana)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[**henkan**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[henkan](../README.md) / ReadingsKanjiFormsPair
|
|
6
|
+
|
|
7
|
+
# Interface: ReadingsKanjiFormsPair
|
|
8
|
+
|
|
9
|
+
Defined in: [types.ts:112](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L112)
|
|
10
|
+
|
|
11
|
+
A word's readings-kanji forms pair
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### kanjiForms?
|
|
16
|
+
|
|
17
|
+
> `optional` **kanjiForms**: [`DictKanjiForm`](DictKanjiForm.md)[]
|
|
18
|
+
|
|
19
|
+
Defined in: [types.ts:120](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L120)
|
|
20
|
+
|
|
21
|
+
The kanji forms
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### readings
|
|
26
|
+
|
|
27
|
+
> **readings**: [`DictReading`](DictReading.md)[]
|
|
28
|
+
|
|
29
|
+
Defined in: [types.ts:116](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L116)
|
|
30
|
+
|
|
31
|
+
The readings
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: ResultEntry\<EntryType\>
|
|
8
8
|
|
|
9
|
-
Defined in: [types.ts:
|
|
9
|
+
Defined in: [types.ts:581](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L581)
|
|
10
10
|
|
|
11
11
|
Basic Anki note information
|
|
12
12
|
|
|
@@ -30,7 +30,7 @@ Basic Anki note information
|
|
|
30
30
|
|
|
31
31
|
> `optional` **deckPath**: `string`
|
|
32
32
|
|
|
33
|
-
Defined in: [types.ts:
|
|
33
|
+
Defined in: [types.ts:597](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L597)
|
|
34
34
|
|
|
35
35
|
The full path of the Anki deck
|
|
36
36
|
|
|
@@ -40,7 +40,7 @@ The full path of the Anki deck
|
|
|
40
40
|
|
|
41
41
|
> `optional` **doNotCreateNote**: `true`
|
|
42
42
|
|
|
43
|
-
Defined in: [types.ts:
|
|
43
|
+
Defined in: [types.ts:605](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L605)
|
|
44
44
|
|
|
45
45
|
Whether or not this entry should be converted into an Anki note
|
|
46
46
|
|
|
@@ -50,7 +50,7 @@ Whether or not this entry should be converted into an Anki note
|
|
|
50
50
|
|
|
51
51
|
> `optional` **id**: `` `${number}` ``
|
|
52
52
|
|
|
53
|
-
Defined in: [types.ts:
|
|
53
|
+
Defined in: [types.ts:589](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L589)
|
|
54
54
|
|
|
55
55
|
ID used for the Anki note ID
|
|
56
56
|
|
|
@@ -60,7 +60,7 @@ ID used for the Anki note ID
|
|
|
60
60
|
|
|
61
61
|
> `optional` **noteID**: `string`
|
|
62
62
|
|
|
63
|
-
Defined in: [types.ts:
|
|
63
|
+
Defined in: [types.ts:585](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L585)
|
|
64
64
|
|
|
65
65
|
ID used for the resulting Anki note
|
|
66
66
|
|
|
@@ -70,7 +70,7 @@ ID used for the resulting Anki note
|
|
|
70
70
|
|
|
71
71
|
> `optional` **noteTypeName**: `string`
|
|
72
72
|
|
|
73
|
-
Defined in: [types.ts:
|
|
73
|
+
Defined in: [types.ts:593](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L593)
|
|
74
74
|
|
|
75
75
|
Anki note type name
|
|
76
76
|
|
|
@@ -80,6 +80,6 @@ Anki note type name
|
|
|
80
80
|
|
|
81
81
|
> `optional` **tags**: `string`[]
|
|
82
82
|
|
|
83
|
-
Defined in: [types.ts:
|
|
83
|
+
Defined in: [types.ts:601](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L601)
|
|
84
84
|
|
|
85
85
|
Tags generated based on the entry's information
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: TanakaExample
|
|
8
8
|
|
|
9
|
-
Defined in: [types.ts:
|
|
9
|
+
Defined in: [types.ts:415](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L415)
|
|
10
10
|
|
|
11
11
|
Tanaka Corpus `examples.utf` examples
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ Tanaka Corpus `examples.utf` examples
|
|
|
16
16
|
|
|
17
17
|
> `optional` **furigana**: `string`
|
|
18
18
|
|
|
19
|
-
Defined in: [types.ts:
|
|
19
|
+
Defined in: [types.ts:435](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L435)
|
|
20
20
|
|
|
21
21
|
The Japanese phrase, with furigana attached
|
|
22
22
|
|
|
@@ -26,7 +26,7 @@ The Japanese phrase, with furigana attached
|
|
|
26
26
|
|
|
27
27
|
> `optional` **glossNumber**: [`GlossSpecificNumber`](GlossSpecificNumber.md)
|
|
28
28
|
|
|
29
|
-
Defined in: [types.ts:
|
|
29
|
+
Defined in: [types.ts:439](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L439)
|
|
30
30
|
|
|
31
31
|
The word-gloss pair
|
|
32
32
|
|
|
@@ -36,7 +36,7 @@ The word-gloss pair
|
|
|
36
36
|
|
|
37
37
|
> `readonly` **id**: `` `${number}_${number}` ``
|
|
38
38
|
|
|
39
|
-
Defined in: [types.ts:
|
|
39
|
+
Defined in: [types.ts:419](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L419)
|
|
40
40
|
|
|
41
41
|
The ID of the example
|
|
42
42
|
|
|
@@ -46,7 +46,7 @@ The ID of the example
|
|
|
46
46
|
|
|
47
47
|
> `readonly` **parts**: [`ExamplePart`](ExamplePart.md)[]
|
|
48
48
|
|
|
49
|
-
Defined in: [types.ts:
|
|
49
|
+
Defined in: [types.ts:431](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L431)
|
|
50
50
|
|
|
51
51
|
The `B` section, split into parts
|
|
52
52
|
|
|
@@ -56,7 +56,7 @@ The `B` section, split into parts
|
|
|
56
56
|
|
|
57
57
|
> `readonly` **phrase**: `string`
|
|
58
58
|
|
|
59
|
-
Defined in: [types.ts:
|
|
59
|
+
Defined in: [types.ts:423](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L423)
|
|
60
60
|
|
|
61
61
|
The Japanese phrase (found in the `A` section, **before** the tab)
|
|
62
62
|
|
|
@@ -66,6 +66,6 @@ The Japanese phrase (found in the `A` section, **before** the tab)
|
|
|
66
66
|
|
|
67
67
|
> `readonly` **translation**: `string`
|
|
68
68
|
|
|
69
|
-
Defined in: [types.ts:
|
|
69
|
+
Defined in: [types.ts:427](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L427)
|
|
70
70
|
|
|
71
71
|
The English translation of the phrase (found in the `A` section, **after** the tab)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: Translation
|
|
8
8
|
|
|
9
|
-
Defined in: [types.ts:
|
|
9
|
+
Defined in: [types.ts:671](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L671)
|
|
10
10
|
|
|
11
11
|
A translation of the word
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ Converted from [DictMeaning](DictMeaning.md)
|
|
|
18
18
|
|
|
19
19
|
> `optional` **notes**: `string`[]
|
|
20
20
|
|
|
21
|
-
Defined in: [types.ts:
|
|
21
|
+
Defined in: [types.ts:679](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L679)
|
|
22
22
|
|
|
23
23
|
Information about the translation
|
|
24
24
|
|
|
@@ -28,6 +28,6 @@ Information about the translation
|
|
|
28
28
|
|
|
29
29
|
> `readonly` **translation**: `string`
|
|
30
30
|
|
|
31
|
-
Defined in: [types.ts:
|
|
31
|
+
Defined in: [types.ts:675](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L675)
|
|
32
32
|
|
|
33
33
|
The translation
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: UsefulRegExps
|
|
8
8
|
|
|
9
|
-
Defined in: [types.ts:
|
|
9
|
+
Defined in: [types.ts:1017](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L1017)
|
|
10
10
|
|
|
11
11
|
Some useful regular expressions
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ Some useful regular expressions
|
|
|
16
16
|
|
|
17
17
|
> `readonly` **hiragana**: `RegExp`
|
|
18
18
|
|
|
19
|
-
Defined in: [types.ts:
|
|
19
|
+
Defined in: [types.ts:1021](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L1021)
|
|
20
20
|
|
|
21
21
|
Matches any *hiragana* character(s)
|
|
22
22
|
|
|
@@ -26,7 +26,7 @@ Matches any *hiragana* character(s)
|
|
|
26
26
|
|
|
27
27
|
> `readonly` **kanji**: `RegExp`
|
|
28
28
|
|
|
29
|
-
Defined in: [types.ts:
|
|
29
|
+
Defined in: [types.ts:1029](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L1029)
|
|
30
30
|
|
|
31
31
|
Matches any *kanji* character(s)
|
|
32
32
|
|
|
@@ -36,7 +36,7 @@ Matches any *kanji* character(s)
|
|
|
36
36
|
|
|
37
37
|
> `readonly` **katakana**: `RegExp`
|
|
38
38
|
|
|
39
|
-
Defined in: [types.ts:
|
|
39
|
+
Defined in: [types.ts:1025](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L1025)
|
|
40
40
|
|
|
41
41
|
Matches any *katakana* character(s)
|
|
42
42
|
|
|
@@ -46,7 +46,7 @@ Matches any *katakana* character(s)
|
|
|
46
46
|
|
|
47
47
|
> `readonly` **regExChars**: `RegExp`
|
|
48
48
|
|
|
49
|
-
Defined in: [types.ts:
|
|
49
|
+
Defined in: [types.ts:1033](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L1033)
|
|
50
50
|
|
|
51
51
|
Matches any character that is part of the regex syntax
|
|
52
52
|
|
|
@@ -56,7 +56,7 @@ Matches any character that is part of the regex syntax
|
|
|
56
56
|
|
|
57
57
|
> `readonly` **tanakaID**: `RegExp`
|
|
58
58
|
|
|
59
|
-
Defined in: [types.ts:
|
|
59
|
+
Defined in: [types.ts:1037](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L1037)
|
|
60
60
|
|
|
61
61
|
Matches the `#ID=` part in a Tanaka Corpus `examples.utf` file
|
|
62
62
|
|
|
@@ -66,7 +66,7 @@ Matches the `#ID=` part in a Tanaka Corpus `examples.utf` file
|
|
|
66
66
|
|
|
67
67
|
> `readonly` **tanakaPart**: `RegExp`
|
|
68
68
|
|
|
69
|
-
Defined in: [types.ts:
|
|
69
|
+
Defined in: [types.ts:1041](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L1041)
|
|
70
70
|
|
|
71
71
|
Matches and splits a part found in the `B` section of a Tanaka Corpus `examples.utf` file
|
|
72
72
|
|
|
@@ -76,6 +76,6 @@ Matches and splits a part found in the `B` section of a Tanaka Corpus `examples.
|
|
|
76
76
|
|
|
77
77
|
> `readonly` **tanakaReferenceID**: `RegExp`
|
|
78
78
|
|
|
79
|
-
Defined in: [types.ts:
|
|
79
|
+
Defined in: [types.ts:1045](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L1045)
|
|
80
80
|
|
|
81
81
|
Matches the reference ID element of a Tanaka example part
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: Word
|
|
8
8
|
|
|
9
|
-
Defined in: [types.ts:
|
|
9
|
+
Defined in: [types.ts:839](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L839)
|
|
10
10
|
|
|
11
11
|
Word information
|
|
12
12
|
|
|
@@ -22,7 +22,7 @@ Converted from [DictWord](DictWord.md)
|
|
|
22
22
|
|
|
23
23
|
> `optional` **common**: `true`
|
|
24
24
|
|
|
25
|
-
Defined in: [types.ts:
|
|
25
|
+
Defined in: [types.ts:867](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L867)
|
|
26
26
|
|
|
27
27
|
#### See
|
|
28
28
|
|
|
@@ -34,7 +34,7 @@ Defined in: [types.ts:785](https://github.com/Ronokof/Henkan/blob/main/src/types
|
|
|
34
34
|
|
|
35
35
|
> `optional` **deckPath**: `string`
|
|
36
36
|
|
|
37
|
-
Defined in: [types.ts:
|
|
37
|
+
Defined in: [types.ts:597](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L597)
|
|
38
38
|
|
|
39
39
|
The full path of the Anki deck
|
|
40
40
|
|
|
@@ -48,7 +48,7 @@ The full path of the Anki deck
|
|
|
48
48
|
|
|
49
49
|
> `optional` **definitions**: [`Definition`](Definition.md)[]
|
|
50
50
|
|
|
51
|
-
Defined in: [types.ts:
|
|
51
|
+
Defined in: [types.ts:863](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L863)
|
|
52
52
|
|
|
53
53
|
Japanese definitions associated with the word
|
|
54
54
|
|
|
@@ -58,7 +58,7 @@ Japanese definitions associated with the word
|
|
|
58
58
|
|
|
59
59
|
> `optional` **doNotCreateNote**: `true`
|
|
60
60
|
|
|
61
|
-
Defined in: [types.ts:
|
|
61
|
+
Defined in: [types.ts:605](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L605)
|
|
62
62
|
|
|
63
63
|
Whether or not this entry should be converted into an Anki note
|
|
64
64
|
|
|
@@ -72,7 +72,7 @@ Whether or not this entry should be converted into an Anki note
|
|
|
72
72
|
|
|
73
73
|
> `optional` **id**: `` `${number}` ``
|
|
74
74
|
|
|
75
|
-
Defined in: [types.ts:
|
|
75
|
+
Defined in: [types.ts:589](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L589)
|
|
76
76
|
|
|
77
77
|
ID used for the Anki note ID
|
|
78
78
|
|
|
@@ -86,7 +86,7 @@ ID used for the Anki note ID
|
|
|
86
86
|
|
|
87
87
|
> `optional` **kanji**: [`Kanji`](Kanji.md)[]
|
|
88
88
|
|
|
89
|
-
Defined in: [types.ts:
|
|
89
|
+
Defined in: [types.ts:855](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L855)
|
|
90
90
|
|
|
91
91
|
A list of kanji used in the kanji forms
|
|
92
92
|
|
|
@@ -96,7 +96,7 @@ A list of kanji used in the kanji forms
|
|
|
96
96
|
|
|
97
97
|
> `optional` **kanjiForms**: [`KanjiForm`](KanjiForm.md)[]
|
|
98
98
|
|
|
99
|
-
Defined in: [types.ts:
|
|
99
|
+
Defined in: [types.ts:851](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L851)
|
|
100
100
|
|
|
101
101
|
The word kanji forms
|
|
102
102
|
|
|
@@ -106,7 +106,7 @@ The word kanji forms
|
|
|
106
106
|
|
|
107
107
|
> `optional` **noteID**: `string`
|
|
108
108
|
|
|
109
|
-
Defined in: [types.ts:
|
|
109
|
+
Defined in: [types.ts:585](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L585)
|
|
110
110
|
|
|
111
111
|
ID used for the resulting Anki note
|
|
112
112
|
|
|
@@ -120,7 +120,7 @@ ID used for the resulting Anki note
|
|
|
120
120
|
|
|
121
121
|
> `optional` **noteTypeName**: `string`
|
|
122
122
|
|
|
123
|
-
Defined in: [types.ts:
|
|
123
|
+
Defined in: [types.ts:593](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L593)
|
|
124
124
|
|
|
125
125
|
Anki note type name
|
|
126
126
|
|
|
@@ -134,7 +134,7 @@ Anki note type name
|
|
|
134
134
|
|
|
135
135
|
> `optional` **phrases**: [`Phrase`](Phrase.md)[]
|
|
136
136
|
|
|
137
|
-
Defined in: [types.ts:
|
|
137
|
+
Defined in: [types.ts:859](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L859)
|
|
138
138
|
|
|
139
139
|
Phrases associated to the word
|
|
140
140
|
|
|
@@ -144,7 +144,7 @@ Phrases associated to the word
|
|
|
144
144
|
|
|
145
145
|
> **readings**: [`Reading`](Reading.md)[]
|
|
146
146
|
|
|
147
|
-
Defined in: [types.ts:
|
|
147
|
+
Defined in: [types.ts:843](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L843)
|
|
148
148
|
|
|
149
149
|
The word readings (in kana)
|
|
150
150
|
|
|
@@ -154,7 +154,7 @@ The word readings (in kana)
|
|
|
154
154
|
|
|
155
155
|
> `optional` **tags**: `string`[]
|
|
156
156
|
|
|
157
|
-
Defined in: [types.ts:
|
|
157
|
+
Defined in: [types.ts:601](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L601)
|
|
158
158
|
|
|
159
159
|
Tags generated based on the entry's information
|
|
160
160
|
|
|
@@ -168,7 +168,7 @@ Tags generated based on the entry's information
|
|
|
168
168
|
|
|
169
169
|
> **translations**: [`Translation`](Translation.md)[]
|
|
170
170
|
|
|
171
|
-
Defined in: [types.ts:
|
|
171
|
+
Defined in: [types.ts:847](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L847)
|
|
172
172
|
|
|
173
173
|
The word translations/senses
|
|
174
174
|
|
|
@@ -178,7 +178,7 @@ The word translations/senses
|
|
|
178
178
|
|
|
179
179
|
> `optional` **usuallyInKana**: `true`
|
|
180
180
|
|
|
181
|
-
Defined in: [types.ts:
|
|
181
|
+
Defined in: [types.ts:871](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L871)
|
|
182
182
|
|
|
183
183
|
#### See
|
|
184
184
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: WordDefinitionPair
|
|
8
8
|
|
|
9
|
-
Defined in: [types.ts:
|
|
9
|
+
Defined in: [types.ts:551](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L551)
|
|
10
10
|
|
|
11
11
|
A word paired with its definitions
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ A word paired with its definitions
|
|
|
16
16
|
|
|
17
17
|
> **definitions**: [`Definition`](Definition.md)[]
|
|
18
18
|
|
|
19
|
-
Defined in: [types.ts:
|
|
19
|
+
Defined in: [types.ts:559](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L559)
|
|
20
20
|
|
|
21
21
|
The word definitions
|
|
22
22
|
|
|
@@ -24,8 +24,8 @@ The word definitions
|
|
|
24
24
|
|
|
25
25
|
### wordID
|
|
26
26
|
|
|
27
|
-
> **wordID**: `
|
|
27
|
+
> **wordID**: `` `${number}` ``
|
|
28
28
|
|
|
29
|
-
Defined in: [types.ts:
|
|
29
|
+
Defined in: [types.ts:555](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L555)
|
|
30
30
|
|
|
31
31
|
The word's JMdict entry ID
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
> **Dict** = [`DictWord`](../interfaces/DictWord.md)[] \| [`DictKanji`](../interfaces/DictKanji.md)[] \| [`TanakaExample`](../interfaces/TanakaExample.md)[] \| [`DictRadical`](../interfaces/DictRadical.md)[] \| [`DictKanjiWithRadicals`](../interfaces/DictKanjiWithRadicals.md)[] \| [`WordDefinitionPair`](../interfaces/WordDefinitionPair.md)[]
|
|
10
10
|
|
|
11
|
-
Defined in: [types.ts:
|
|
11
|
+
Defined in: [types.ts:565](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L565)
|
|
12
12
|
|
|
13
13
|
Types of converted dictionary entries
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
> **DictTranslation** = `string` \| \{ `translation`: `string`; `type`: `"lit"` \| `"expl"` \| `"tm"`; \}
|
|
10
10
|
|
|
11
|
-
Defined in: [types.ts:
|
|
11
|
+
Defined in: [types.ts:126](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L126)
|
|
12
12
|
|
|
13
13
|
A JMdict sense translation
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
> **EntryType** = `"word"` \| `"kanji"` \| `"radical"` \| `"kana"` \| `"grammar"`
|
|
10
10
|
|
|
11
|
-
Defined in: [types.ts:
|
|
11
|
+
Defined in: [types.ts:576](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L576)
|
|
12
12
|
|
|
13
13
|
Names of entry types used for the Anki note IDs
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[**henkan**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[henkan](../README.md) / KanjiEntryMap
|
|
6
|
+
|
|
7
|
+
# Type Alias: KanjiEntryMap
|
|
8
|
+
|
|
9
|
+
> **KanjiEntryMap** = `Map`\<`string`, [`DictKanji`](../interfaces/DictKanji.md)\>
|
|
10
|
+
|
|
11
|
+
Defined in: [types.ts:449](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L449)
|
|
12
|
+
|
|
13
|
+
A `KANJIDIC kanji character` ---> [DictKanji](../interfaces/DictKanji.md) `object` map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[**henkan**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[henkan](../README.md) / KanjiSVGMap
|
|
6
|
+
|
|
7
|
+
# Type Alias: KanjiSVGMap
|
|
8
|
+
|
|
9
|
+
> **KanjiSVGMap** = `Map`\<`string`, `string`\>
|
|
10
|
+
|
|
11
|
+
Defined in: [types.ts:453](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L453)
|
|
12
|
+
|
|
13
|
+
A `KANJIDIC kanji character` ---> `SVG filename` map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[**henkan**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[henkan](../README.md) / KanjiWordsMap
|
|
6
|
+
|
|
7
|
+
# Type Alias: KanjiWordsMap
|
|
8
|
+
|
|
9
|
+
> **KanjiWordsMap** = `Map`\<`string`, [`DictWord`](../interfaces/DictWord.md)[]\>
|
|
10
|
+
|
|
11
|
+
Defined in: [types.ts:457](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L457)
|
|
12
|
+
|
|
13
|
+
A `KANJIDIC kanji character` ---> `JMdict entries with kanji forms that include the kanji` map
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
> **Result** = [`Word`](../interfaces/Word.md) \| [`Kanji`](../interfaces/Kanji.md) \| [`Radical`](../interfaces/Radical.md) \| [`Kana`](../interfaces/Kana.md) \| [`Grammar`](../interfaces/Grammar.md)
|
|
10
10
|
|
|
11
|
-
Defined in: [types.ts:
|
|
11
|
+
Defined in: [types.ts:951](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L951)
|
|
12
12
|
|
|
13
13
|
Any type of converted entry from a [Dict](Dict.md) array + others not from a dictionary
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[**henkan**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[henkan](../README.md) / StringNumber
|
|
6
|
+
|
|
7
|
+
# Type Alias: StringNumber
|
|
8
|
+
|
|
9
|
+
> **StringNumber** = `` `${number}` ``
|
|
10
|
+
|
|
11
|
+
Defined in: [types.ts:55](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L55)
|
|
12
|
+
|
|
13
|
+
A number written as a string
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[**henkan**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[henkan](../README.md) / WordDefinitionsMap
|
|
6
|
+
|
|
7
|
+
# Type Alias: WordDefinitionsMap
|
|
8
|
+
|
|
9
|
+
> **WordDefinitionsMap** = `Map`\<[`StringNumber`](StringNumber.md), [`Definition`](../interfaces/Definition.md)[]\>
|
|
10
|
+
|
|
11
|
+
Defined in: [types.ts:465](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L465)
|
|
12
|
+
|
|
13
|
+
A `JMdict entry ID` ---> `Japanese definitions associated with the JMdict entry` map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[**henkan**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[henkan](../README.md) / WordExamplesMap
|
|
6
|
+
|
|
7
|
+
# Type Alias: WordExamplesMap
|
|
8
|
+
|
|
9
|
+
> **WordExamplesMap** = `Map`\<[`StringNumber`](StringNumber.md), [`TanakaExample`](../interfaces/TanakaExample.md)[]\>
|
|
10
|
+
|
|
11
|
+
Defined in: [types.ts:461](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L461)
|
|
12
|
+
|
|
13
|
+
A `JMdict entry ID` ---> `Tanaka examples associated with the JMdict entry` map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[**henkan**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[henkan](../README.md) / WordIDEntryMap
|
|
6
|
+
|
|
7
|
+
# Type Alias: WordIDEntryMap
|
|
8
|
+
|
|
9
|
+
> **WordIDEntryMap** = `Map`\<[`StringNumber`](StringNumber.md), [`DictWord`](../interfaces/DictWord.md)\>
|
|
10
|
+
|
|
11
|
+
Defined in: [types.ts:445](https://github.com/Ronokof/Henkan/blob/main/src/types.ts#L445)
|
|
12
|
+
|
|
13
|
+
A `JMdict entry ID` ---> [DictWord](../interfaces/DictWord.md) `object` map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "henkan",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "A Node.JS library that helps you convert any dictionary from EDRDG, transform their entries into more user-friendly schemas and create Anki notes from them.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fjsd",
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
"lint": "eslint src --ext .ts,.tsx --fix --fix-type problem,suggestion,layout && eslint test --ext .ts,.tsx --fix --fix-type problem,suggestion,layout",
|
|
62
62
|
"prepare": "npm run lint && npm run build && npm run docs:api",
|
|
63
63
|
"docs:api": "typedoc --plugin typedoc-plugin-markdown --out docs/api src/index.ts --readme none --excludePrivate --excludeProtected --excludeNotDocumented --hideGenerator --sourceLinkTemplate \"https://github.com/Ronokof/Henkan/blob/{gitRevision}/{path}#L{line}\" --gitRevision main",
|
|
64
|
-
"
|
|
64
|
+
"update:pkgs": "node ./scripts/update-packages.cjs"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@types/node": "^24.10.4",
|
|
68
68
|
"@types/xml2js": "^0.4.14",
|
|
69
|
-
"@typescript-eslint/eslint-plugin": "^8.50.
|
|
70
|
-
"@typescript-eslint/parser": "^8.50.
|
|
69
|
+
"@typescript-eslint/eslint-plugin": "^8.50.1",
|
|
70
|
+
"@typescript-eslint/parser": "^8.50.1",
|
|
71
71
|
"@vitest/coverage-v8": "^4.0.16",
|
|
72
72
|
"esbuild": "^0.27.2",
|
|
73
73
|
"eslint": "^9.39.2",
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
[**henkan**](../README.md)
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[henkan](../README.md) / isValidArray
|
|
6
|
-
|
|
7
|
-
# Function: isValidArray()
|
|
8
|
-
|
|
9
|
-
> **isValidArray**(`arg`): `arg is any[]`
|
|
10
|
-
|
|
11
|
-
Defined in: [utils.ts:63](https://github.com/Ronokof/Henkan/blob/main/src/utils.ts#L63)
|
|
12
|
-
|
|
13
|
-
Checks if the argument is an array.
|
|
14
|
-
|
|
15
|
-
## Parameters
|
|
16
|
-
|
|
17
|
-
### arg
|
|
18
|
-
|
|
19
|
-
`any`
|
|
20
|
-
|
|
21
|
-
The argument
|
|
22
|
-
|
|
23
|
-
## Returns
|
|
24
|
-
|
|
25
|
-
`arg is any[]`
|
|
26
|
-
|
|
27
|
-
Whether or not [arg](#isvalidarray) is an array
|