public class Tokenizer extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
Tokenizer.Token
A token in a requirement string.
|
protected static class |
Tokenizer.TokenType
The different types of tokens (unary operators, binary operators, delimiters and versions)
|
| Constructor and Description |
|---|
Tokenizer() |
| Modifier and Type | Method and Description |
|---|---|
protected static List<Tokenizer.Token> |
tokenize(String requirement,
Semver.SemverType type)
Takes a NPM requirement string and creates a list of tokens by performing 3 operations:
- If the token is a version, it will add the version string
- If the token is an operator, it will add the operator
- It will insert missing "AND" operators for ranges
|
protected static List<Tokenizer.Token> tokenize(String requirement, Semver.SemverType type)
requirement - the requirement stringtype - the version system used when tokenizing the requirementCopyright © 2021. All rights reserved.