OptionalsortMaker: (key: string | number) => stringTakes an object key and returns the value to use when sorting it.
Use this to e.g., add padding to numbers before sorting as strings or to sort 'primary', 'secondary', etc. as their numerical values.
Sorts a record object according to its keys and returns a sorted copy.
Optionally provide a function to create the strings used to sort each object.