Use Object.entries rather than for in

This commit is contained in:
toasted-nutbread 2020-02-25 19:54:59 -05:00
parent 13a94d06ea
commit 3795af6cb5

View File

@ -57,9 +57,9 @@ class Deinflector {
static normalizeReasons(reasons) {
const normalizedReasons = [];
for (const reason in reasons) {
for (const [reason, reasonInfo] of Object.entries(reasons)) {
const variants = [];
for (const {kanaIn, kanaOut, rulesIn, rulesOut} of reasons[reason]) {
for (const {kanaIn, kanaOut, rulesIn, rulesOut} of reasonInfo) {
variants.push([
kanaIn,
kanaOut,