MrShi
8 天以前 a7ce91217818bd6bb19bc9c7a7151110e70c26f0
1
2
3
4
5
6
'use strict';
 
module.exports = function parseProtocol(url) {
  var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
  return match && match[1] || '';
};