Sorts an object's keys in lexicographic order and returns a new object with the sorted keys.
The object to sort.
A new object with keys sorted in lexicographic order.
const obj = { b: 2, a: 1, c: 3 }sortKeys(obj)// => { a: 1, b: 2, c: 3 } Copy
const obj = { b: 2, a: 1, c: 3 }sortKeys(obj)// => { a: 1, b: 2, c: 3 }
Sorts an object's keys in lexicographic order and returns a new object with the sorted keys.