summaryrefslogtreecommitdiff
path: root/Games
diff options
context:
space:
mode:
authormattco98 <matthewcolsson@gmail.com>2020-04-28 19:19:31 -0700
committerAndreas Kling <kling@serenityos.org>2020-04-29 18:47:03 +0200
commit95abcc3722af0ec0115d519504e19d05c9cb79a5 (patch)
tree7bfd09133c9c56d680e3a81fc3016142cd1b534d /Games
parent58f6f50de48965a6bf0113c7e9ba79889dba09ac (diff)
downloadserenity-95abcc3722af0ec0115d519504e19d05c9cb79a5.zip
LibJS: Implement correct object property ordering
This commit introduces a way to get an object's own properties in the correct order. The "correct order" for JS object properties is first all array-like index properties (numeric keys) sorted by insertion order, followed by all string properties sorted by insertion order. Objects also now print correctly in the repl! Before this commit: courage ~/js-tests $ js > ({ foo: 1, bar: 2, baz: 3 }) { bar: 2, foo: 1, baz: 3 } After: courage ~/js-tests $ js > ({ foo: 1, bar: 2, baz: 3 }) { foo: 1, bar: 2, baz: 3 }
Diffstat (limited to 'Games')
0 files changed, 0 insertions, 0 deletions