Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We���ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keyset: add merge #350

Open
Yeti-or opened this issue Oct 4, 2018 · 0 comments
Open

keyset: add merge #350

Yeti-or opened this issue Oct 4, 2018 · 0 comments

Comments

@Yeti-or
Copy link
Member

Yeti-or commented Oct 4, 2018

this is ugly right now =(

            const keyset = keysets.reduce((acc, k) => {
                const langs = k.langs;
                langs.forEach(lang => {
                    const langKeys = acc.getLangKeysForLang(lang);
                    const keys = langKeys ? acc.getKeysForLang(lang) : [];
                    const _keys = k.getKeysForLang(lang);
                    acc.addKeysForLang(lang, new LangKeys(lang, [...keys, ..._keys]));
                });
                return acc;
            }, new Keyset('', move));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant