mattco98
95abcc3722
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 }
2020-04-29 18:47:03 +02:00
..
2020-04-15 09:48:25 +02:00
2020-04-15 21:23:06 +02:00
2020-04-23 09:47:23 +02:00
2020-04-28 20:15:38 +02:00
2020-04-28 15:35:24 +02:00
2020-04-14 12:55:31 +02:00
2020-04-17 16:14:28 +02:00
2020-04-20 11:38:01 +02:00
2020-04-28 20:15:38 +02:00
2020-04-28 20:15:38 +02:00
2020-04-20 11:38:01 +02:00
2020-04-23 19:30:16 +02:00
2020-04-23 11:06:10 +02:00
2020-04-29 01:30:59 +02:00
2020-04-22 13:08:00 +02:00
2020-04-28 20:15:38 +02:00
2020-04-29 09:38:25 +02:00
2020-04-14 13:40:04 +02:00
2020-04-20 17:26:46 +02:00
2020-04-29 09:38:25 +02:00
2020-04-19 02:09:06 +02:00
2020-04-28 13:11:10 +02:00
2020-04-29 01:30:59 +02:00
2020-04-14 13:40:04 +02:00
2020-04-14 12:55:31 +02:00
2020-04-18 14:04:24 +02:00
2020-04-23 19:38:13 +02:00
2020-04-23 19:38:13 +02:00
2020-04-23 19:38:13 +02:00
2020-04-23 19:38:13 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-20 11:38:01 +02:00
2020-04-20 11:38:01 +02:00
2020-04-14 17:26:57 +02:00
2020-03-28 16:33:52 +01:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-26 15:51:07 +02:00
2020-04-28 15:07:08 +02:00
2020-04-26 19:05:08 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-28 23:11:18 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-20 11:38:01 +02:00
2020-04-16 09:41:07 +02:00
2020-04-14 12:55:31 +02:00
2020-04-21 12:23:07 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-23 19:38:13 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-20 11:38:01 +02:00
2020-04-26 20:36:59 +02:00
2020-04-23 11:03:42 +02:00
2020-04-14 12:55:31 +02:00
2020-04-18 12:34:13 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-23 19:38:13 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-26 20:36:59 +02:00
2020-04-28 14:49:43 +02:00
2020-04-26 20:36:59 +02:00
2020-04-26 20:36:59 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-23 23:56:04 +02:00
2020-04-28 20:37:21 +02:00
2020-04-20 11:38:01 +02:00
2020-04-29 18:47:03 +02:00
2020-04-14 12:55:31 +02:00
2020-04-26 13:53:05 +02:00
2020-04-14 12:55:31 +02:00
2020-04-28 20:03:50 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-20 22:44:13 +02:00
2020-04-28 15:35:24 +02:00
2020-04-14 12:55:31 +02:00
2020-04-16 16:36:51 +02:00
2020-04-25 16:54:25 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-20 11:41:25 +02:00
2020-04-29 18:35:18 +02:00
2020-04-14 12:55:31 +02:00
2020-04-16 18:47:24 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-15 08:47:40 +02:00
2020-04-13 16:28:50 +02:00
2020-04-13 16:28:50 +02:00
2020-04-13 16:28:50 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-20 20:33:21 +02:00
2020-04-14 12:55:31 +02:00
2020-04-29 01:30:59 +02:00
2020-04-14 12:55:31 +02:00
2020-04-28 15:07:08 +02:00
2020-04-22 13:09:59 +02:00
2020-04-14 12:55:31 +02:00
2020-04-14 12:55:31 +02:00
2020-04-20 11:38:01 +02:00
2020-04-14 12:55:31 +02:00
2020-04-15 19:12:51 +02:00
2020-04-22 11:48:14 +02:00