blob: 708c3c9d83d06c50d4d870b1a5e3b6629c8d4c54 (
plain)
1
2
3
4
5
6
7
8
9
|
'use strict';
module.exports = url => {
if (typeof url !== 'string') {
throw new TypeError(`Expected a \`string\`, got \`${typeof url}\``);
}
return /^[a-z][a-z\d+.-]*:/.test(url);
};
|