Skip to content
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

Closed
wants to merge 5 commits into from
Closed

feat: Add function to validate an identifier #351

wants to merge 5 commits into from

Conversation

boxcee
Copy link

@boxcee boxcee commented Nov 11, 2020

References

Closes #350

@farahmandakbar farahmandakbar linked an issue May 12, 2022 that may be closed by this pull request
Copy link
Contributor

@ljharb ljharb left a 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* `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'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
identifier: require('./functions/identifier'),
preIdentifier: require('./functions/preIdentifier'),

@wraithgar wraithgar requested a review from a team as a code owner April 5, 2023 23:39
@wraithgar wraithgar requested review from wraithgar and removed request for a team April 5, 2023 23:39
@wraithgar wraithgar changed the title Add function to validate an identifier feat: Add function to validate an identifier Apr 5, 2023
@wraithgar
Copy link
Member

#534

@wraithgar wraithgar closed this Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Function to check for validity of a prerelease identifier require('semver')
3 participants