• Returns whether the given strings are equal

    Parameters

    • Optionaltext: null | string

      the source string to check

    • Optionalcomparison: null | string

      the target string to compare

    Returns boolean

    whether the given strings are equal

    equals(undefined, null);    // false
    equals('foo', 'foo'); // true
    equals('foo', 'bar'); // false