Sort translation output files for easier merges

This commit is contained in:
Pieter Vander Vennet 2021-09-14 18:20:25 +02:00
parent 2717ad55b8
commit 5d81e7d792
49 changed files with 7143 additions and 7117 deletions

View file

@ -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);