summaryrefslogtreecommitdiff
path: root/alarm/node_modules/axios/lib/helpers/parseProtocol.js
blob: 586ec9647106eac9343adfe8d683db406205dde7 (plain)
1
2
3
4
5
6
'use strict';

export default function parseProtocol(url) {
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
  return match && match[1] || '';
}