| | |
| | | |
| | | const createToken = (name, value, isGlobal) => { |
| | | const index = R++ |
| | | debug(index, value) |
| | | debug(name, index, value) |
| | | t[name] = index |
| | | src[index] = value |
| | | re[index] = new RegExp(value, isGlobal ? 'g' : undefined) |
| | |
| | | // Star ranges basically just allow anything at all. |
| | | createToken('STAR', '(<|>)?=?\\s*\\*') |
| | | // >=0.0.0 is like a star |
| | | createToken('GTE0', '^\\s*>=\\s*0\.0\.0\\s*$') |
| | | createToken('GTE0PRE', '^\\s*>=\\s*0\.0\.0-0\\s*$') |
| | | createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$') |
| | | createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$') |