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