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

Provide example for isOneOf #31

Open
xenoterracide opened this issue Jul 28, 2022 · 0 comments
Open

Provide example for isOneOf #31

xenoterracide opened this issue Jul 28, 2022 · 0 comments

Comments

@xenoterracide
Copy link

I would suggest the port example, but it has a problem arcanis/clipanion#125, otherwise this is probably a good example

// don't use well known ports
const isPort = isOneOf(
  [isLiteral(0), cascade(isNumber(), isInteger(), isPositive(), isInInclusiveRange(1024, 65535))],
  { exclusive: true },
)
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

No branches or pull requests

1 participant