• Checks whether the url path contains the fragment argument.

    Note that if the URL fragment does not exist, then Javascript considers the fragment to be an empty string or ''.

    So if the fragment argument is also an empty string, the validation result will be true as an empty string contains and empty string.

    Also Note that the validation of the url argument should be performed before passing the url argument to this validation.

    Example

    expect(isURLPathsEqual(urlA, "/aa/bb/").value).toBeTruthy();
    

    Parameters

    • url: string

      The url string

    • fragment: string

    Returns Result<boolean | undefined>

Generated using TypeDoc