-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add function to validate an identifier #351
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be awesome to see this rebased so it can be landed :-)
@@ -398,6 +399,7 @@ strings that they parse. | |||
or comparators intersect. | |||
* `parse(v)`: Attempt to parse a string as a semantic version, returning either | |||
a `SemVer` object or `null`. | |||
* `identifier(v)`: Return a valid prerelease identifier, or null if it's not valid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* `identifier(v)`: Return a valid prerelease identifier, or null if it's not valid. | |
* `preIdentifier(v)`: Return a valid prerelease identifier, or null if it's not valid. |
let's make sure this is clearly a prerelease identifier
index.js
Outdated
@@ -45,4 +45,5 @@ module.exports = { | |||
intersects: require('./ranges/intersects'), | |||
simplifyRange: require('./ranges/simplify'), | |||
subset: require('./ranges/subset'), | |||
identifier: require('./functions/identifier'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
identifier: require('./functions/identifier'), | |
preIdentifier: require('./functions/preIdentifier'), |
References
Closes #350