loulijun2021
2023-12-08 ee4c68b99fa9ccd733ca547aeb16db90c7e2dd23
1
2
3
4
5
6
'use strict';
 
export default function parseProtocol(url) {
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
  return match && match[1] || '';
}