aboutsummaryrefslogtreecommitdiff
path: root/ext/jp/dictionary.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-03-23 18:12:33 -0700
committerAlex Yatskov <alex@foosoft.net>2016-03-23 18:12:33 -0700
commitc30837065889d4fc4d2984b14b365cc276c79214 (patch)
treeff0b620b6ef146828be43737aa79cc6c80b9a563 /ext/jp/dictionary.js
parenta9c92bdfbf32a96210cf676124d855880f3309e2 (diff)
Fixes to make deinflection work
Diffstat (limited to 'ext/jp/dictionary.js')
-rw-r--r--ext/jp/dictionary.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/ext/jp/dictionary.js b/ext/jp/dictionary.js
index 18a15ab0..e9e81503 100644
--- a/ext/jp/dictionary.js
+++ b/ext/jp/dictionary.js
@@ -56,7 +56,13 @@ class Dictionary {
findTermInDict(term, dict) {
return (dict.indices[term] || []).map(index => {
const [e, r, g, t] = dict.defs[index];
- return {id: index, expression: e, reading: r, glossary: g, tags: t};
+ return {
+ id: index,
+ expression: e,
+ reading: r,
+ glossary: g,
+ tags: t
+ };
});
}
@@ -67,6 +73,12 @@ class Dictionary {
}
const [c, k, o, g] = def;
- return {id: kanji.charCodeAt(0), character: c, kunyomi: k, onyomi: o, glossary: g};
+ return {
+ id: kanji.charCodeAt(0),
+ character: c,
+ kunyomi: k,
+ onyomi: o,
+ glossary: g
+ };
}
}