/
githubmirror
/
atom
Обзор
Документация
Войти
/
githubmirror
/
atom
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/get-release-channel.js
12 строк
363 B
Nathan Sobo
Fix lint error
25 июн 2019, 02:01
25 июн 2019, 02:01
a582a1a
Код
Авторство
О чём код?
module.exports = function(version) { // This matches stable, dev (with or without commit hash) and any other // release channel following the pattern '1.00.0-channel0' const match = version.match(/\d+\.\d+\.\d+(-([a-z]+)(\d+|-\w{4,})?)?$/); if (!match) { return 'unrecognized'; } else if (match[2]) { return match[2]; } return 'stable'; };