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