/
githubmirror
/
axios
Обзор
Документация
Войти
/
githubmirror
/
axios
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v1.x
lib/helpers/parseProtocol.js
6 строк
153 B
DeepView Autofix
fix(parseProtocol): fix regex to require colon in protocol separator (#10729)
25 апр 2026, 19:27
Не верифицирован
25 апр 2026, 19:27
f2dc449
Код
Авторство
О чём код?
'use strict'; export default function parseProtocol(url) { const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url); return (match && match[1]) || ''; }