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