forked from MapComplete/MapComplete
Sort translation output files for easier merges
This commit is contained in:
parent
2717ad55b8
commit
5d81e7d792
49 changed files with 7143 additions and 7117 deletions
|
@ -40,6 +40,17 @@ export default class UtilsSpec extends T {
|
|||
|
||||
constructor() {
|
||||
super("Utils", [
|
||||
["Sort object keys", () => {
|
||||
const o = {
|
||||
x: 'x',
|
||||
abc: {'x':'x','a':'a'},
|
||||
def: 'def'
|
||||
}
|
||||
equal('{"x":"x","abc":{"x":"x","a":"a"},"def":"def"}', JSON.stringify(o))
|
||||
const copy = Utils.sortKeys(o)
|
||||
equal('{"abc":{"a":"a","x":"x"},"def":"def","x":"x"}', JSON.stringify(copy))
|
||||
}],
|
||||
|
||||
["Minify-json", () => {
|
||||
const str = JSON.stringify({title: "abc", "and": "xyz", "render": "somevalue"}, null, 0);
|
||||
const minified = Utils.MinifyJSON(str);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue