code: function getSortedObject(object, compareFunction)
  {
    const keys = Object.keys(object);
  
    keys.sort( compareFunction );
  
    return keys.reduce(
      (sorted, key) => (sorted[ key ] = object[ key ], sorted),
      Object.create(null)
    );
  }
docs: Get an object sorted by keys.
  
  @param  {object} object
  @param {function} compareFunction
  @return {object}