diff options
Diffstat (limited to 'node_modules/is-absolute-url/index.js')
| -rw-r--r-- | node_modules/is-absolute-url/index.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/node_modules/is-absolute-url/index.js b/node_modules/is-absolute-url/index.js new file mode 100644 index 00000000..06b28161 --- /dev/null +++ b/node_modules/is-absolute-url/index.js @@ -0,0 +1,8 @@ +'use strict'; +module.exports = function (url) { + if (typeof url !== 'string') { + throw new TypeError('Expected a string'); + } + + return /^[a-z][a-z0-9+.-]*:/.test(url); +}; |
