/
githubmirror
/
marktext
Обзор
Документация
Войти
/
githubmirror
/
marktext
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/muyajs/lib/utils/hash.js
19 строк
496 B
Ran Luo
chore: convert repo to pnpm monorepo (packages/desktop, muyajs, website) (#4302)
29 май 2026, 05:25
Не верифицирован
29 май 2026, 05:25
565bfcd
Код
Авторство
О чём код?
/** * generate constants map hash, the value is lowercase of the key, * also translate `_` to `-`] */ export const genUpper2LowerKeyHash = keys => { return keys.reduce((acc, key) => { const value = key.toLowerCase().replace(/_/g, '-') return Object.assign(acc, { [key]: value }) }, {}) } /** * generate constants map, the value is the key. */ export const generateKeyHash = keys => { return keys.reduce((acc, key) => { return Object.assign(acc, { [key]: key }) }, {}) }