tokenize
fun tokenize(requirement: String, type: Semver.SemverType): List<Tokenizer.Token?>
Content copied to clipboard
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
Return
the list of tokens
Parameters
requirement
the requirement string
type
the version system used when tokenizing the requirement