mirror of
https://scm.univ-tours.fr/22107988t/rappaurio-sae501_502.git
synced 2025-08-29 15:05:59 +02:00
7 lines
151 B
JavaScript
7 lines
151 B
JavaScript
'use strict';
|
|
|
|
export default function parseProtocol(url) {
|
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
return match && match[1] || '';
|
|
}
|