function sortProperties(locale) { let entries = Object.entries(locale) entries.sort(([a], [b]) => { if (a < b) return -1 if (a > b) return 1 return 0 }) return Object.fromEntries(entries) } module.exports = { sortProperties, }