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

typeof validations #3

Open
grokky1 opened this issue Oct 1, 2017 · 2 comments
Open

typeof validations #3

grokky1 opened this issue Oct 1, 2017 · 2 comments

Comments

@grokky1
Copy link

grokky1 commented Oct 1, 2017

Is there a way to perform type validations for string, number, object, array, sequence, etc.?

So: isNumber(), isObject(), isArray(), etc. There are some already, e.g. isDate and isNumber and isInt, but there are not a complete set of these sort of validations.

I guess internally they would use typeof foo === "string" and so on.

@pmendelski
Copy link
Contributor

ATM it is not possible

@pmendelski pmendelski reopened this Oct 2, 2017
@grokky1
Copy link
Author

grokky1 commented Oct 2, 2017

@mendlik That's surprising, I thought it would be easy for something so simple... But I don't know the codebase like you do!

For now I just do custom validation for those cases - ugly but works 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants