summaryrefslogtreecommitdiff
path: root/includes/external/addressbook/node_modules/axios/lib/helpers/parseProtocol.js
diff options
context:
space:
mode:
Diffstat (limited to 'includes/external/addressbook/node_modules/axios/lib/helpers/parseProtocol.js')
-rw-r--r--includes/external/addressbook/node_modules/axios/lib/helpers/parseProtocol.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/includes/external/addressbook/node_modules/axios/lib/helpers/parseProtocol.js b/includes/external/addressbook/node_modules/axios/lib/helpers/parseProtocol.js
new file mode 100644
index 0000000..586ec96
--- /dev/null
+++ b/includes/external/addressbook/node_modules/axios/lib/helpers/parseProtocol.js
@@ -0,0 +1,6 @@
+'use strict';
+
+export default function parseProtocol(url) {
+ const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
+ return match && match[1] || '';
+}