add language hash

main
briandennis 7 years ago
parent 535da42962
commit c4296c7ee7

@ -233,6 +233,8 @@ export const LANGUAGES = [
} }
] ]
export const LANGUAGE_HASH = toHash(LANGUAGES)
export const DEFAULT_LANGUAGE = { name: 'Auto' } export const DEFAULT_LANGUAGE = { name: 'Auto' }
export const COLORS = { export const COLORS = {
@ -261,3 +263,13 @@ if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') {
} }
}) })
} }
function toHash (list) {
return list.reduce((accum, item) => {
if (item.module) {
accum[item.module] = item
}
return accum
}, {})
}
Loading…
Cancel
Save