Documentation
    Preparing search index...

    Function defaultArrayComparer

    • Provides default implementation for sorting JS arrays.

      Parameters

      • x: unknown
      • y: unknown

      Returns number

      The implementation sorts the array with the following order

      • undefined
      • null
      • boolean (false, true)
      • number / bigint
      • string
      • object

      objects of the same type are compared with the comparer function retrieved from getComparer. Attempting to compare other primitive types, or object types that are yet to be registered (with registerComparer) will cause InvalidOperationError.