Function trueFirst

  • Compares two values and puts true first.

    See

    trueLast

    Example

    // use compareBy to broaden to truthy and falsy values
    const truthyFirst = compareBy(x => !!x, trueFirst);

    Parameters

    • a: boolean

      first value

    • b: boolean

      second value

    Returns number

Generated using TypeDoc