@metreeca/core - v0.13.0
    Preparing search index...

    Function absent

    • Wraps a comparator to sort absent values first, undefined ahead of null.

      Null values are treated as less than any other value, and undefined values as less than null ones. All other values are ordered by comparator, so it can safely assume that neither of its arguments is ever null or undefined.

      Type Parameters

      • V

        The type of values to compare (may include null/undefined)

      Parameters

      • comparator: Comparator<NonNullable<V>>

        Comparator for non-nullish values

      Returns Comparator<V>

      A comparator placing undefined and then null values first