@helpscout/hsds-react
Version:
React component library for Help Scout's Design System
20 lines (14 loc) • 314 B
JavaScript
exports.__esModule = true;
exports.normalizeUrl = void 0;
var normalizeUrl = function normalizeUrl(string) {
if (!string) {
return '';
}
var url = string;
if (url.search(/^http[s]?:\/\//) === -1) {
url = "http://" + url;
}
return url;
};
exports.normalizeUrl = normalizeUrl;
;