Object to sort
OptionalcompareFn: (a: [key: string, value: unknown], b: [key: string, value: unknown]) => numberOptional compare function to use when sorting the properties; defaults to a.localeCompare(b, 'en')
Optionaloptions: { sortOrder?: "asc" | "desc" }Optional options to control the sort order; defaults to asc
New object with the sorted properties
Deep sort the properties of an object by their key name and return a new object with the sorted properties.