Compares values using the builtin operators < and > and '==='.

This function is not specified for null, undefined, functions or objects. If such things are compared and they are not equal, then the first argument is always treated as smaller. e.g. DEFAULT_COMPARE({}, undefined) === DEFAULT_COMPARE(undefined, {}) === -1

Comparator

  • Parameters

    • a: any
    • b: any

    Returns number