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