UNPKG

eslint-plugin-i18n-json

Version:

Fully extendable eslint plugin for JSON i18n translation files.

14 lines (12 loc) 306 B
// case sensitive traversal orders const keyTraversals = { asc: obj => Object.keys(obj).sort(), desc: obj => Object.keys(obj).sort((a, b) => { // note, objects can't have duplicate keys of the same case if (a < b) { return 1; } return -1; }) }; module.exports = keyTraversals;