/ src / get-release-channel.js
get-release-channel.js
 1  module.exports = function(version) {
 2    // This matches stable, dev (with or without commit hash) and any other
 3    // release channel following the pattern '1.00.0-channel0'
 4    const match = version.match(/\d+\.\d+\.\d+(-([a-z]+)(\d+|-\w{4,})?)?$/);
 5    if (!match) {
 6      return 'unrecognized';
 7    } else if (match[2]) {
 8      return match[2];
 9    }
10  
11    return 'stable';
12  };