function genLevelComparison (levelComparison) {
  if (typeof levelComparison === 'string') {
    return compareLevel.bind(null, levelComparison)
  }

  return levelComparison
}
Create a level comparison function based on `levelComparison`
it could a default function which compares levels either in "ascending" or "descending" order or custom comparison function

@param {SORTING_ORDER | Function} levelComparison sort levels order direction or custom comparison function
@returns Function