Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/utils / dist / module / toUrlWithProtocol.js
Size: Mime:
import { isString, fromIshToString } from 'exotic';
function toUrlWithProtocol(url) {
    const validURL = fromIshToString(url);
    if (isString(validURL) && validURL !== '') {
        const noProtocolURL = validURL.replace(/(^\w+:|^)\/\//, '');
        const updatedURL = '//' + noProtocolURL;
        return updatedURL;
    }
    else {
        return validURL;
    }
}
export { toUrlWithProtocol };
export default toUrlWithProtocol;
//# sourceMappingURL=toUrlWithProtocol.js.map