blob: d37e89fd012633712f04b434bf433a4150e53b35 [file] [log] [blame]
var hasProtocol = new RegExp('^(?:[a-z]+:)?//', 'i');
/*
* Decides whether a string is an absolute Url by seeing if it starts with a protocol.
* @param {string} val string value to check.
* @return {bool} whether or not the string value is a Url
*/
export function isAbsoulteUrl(val) {
return hasProtocol.test(val);
}