mirror of
https://github.com/tenrok/axios.git
synced 2026-06-08 17:22:34 +03:00
Added unit tests; Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function parseProtocol(url) {
|
||||
var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
||||
return match && match[1] || '';
|
||||
};
|
||||
Reference in New Issue
Block a user