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