Function removeDublicateSlashes

  • Removes duplicate slashes from a given URL string.

    Example

    const url = 'http://example.com//path//to//resource';
    const cleanedUrl = removeDublicateSlashes(url);
    console.log(cleanedUrl); // Outputs: 'http://example.com/path/to/resource'

    Parameters

    • value: string

      The URL string from which to remove duplicate slashes.

    Returns string