   else if not isNaN(Number(a)) and not isNaN(Number(b)) then a - b
   else collator(a, b)
 
+defaultCollator = (collator) -> (a, b) ->
+  if a? and b? and not isNaN(Number(a)) and not isNaN(Number(b)) then a - b
+  else collator(a, b)
+
+compare = (a, b) ->
+  hx._.sort.collator ?= collatorFn()
+  defaultCollator(hx._.sort.collator)(a, b)
 
 compareNullsLast = (a, b) ->
   hx._.sort.collator ?= collatorFn()

  if options.nullsLast
    nullsLastCollator(localeCollator)
  else
    (a, b) ->
      if a? and b? and not isNaN(Number(a)) and not isNaN(Number(b)) then a - b
      else localeCollator(a, b)

hx.sortBy = (arr, f) ->
  newArr = [arr...]

    else if String(a) < String(b) then -1
    else 1

nullsLastCollator = (collator) -> (a, b) ->
  if a is b then 0
  else if a is undefined then 1
