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

Add primitive().notOneOf() #10

Closed
bvego opened this issue Jun 30, 2019 · 12 comments
Closed

Add primitive().notOneOf() #10

bvego opened this issue Jun 30, 2019 · 12 comments
Assignees
Labels

Comments

@bvego
Copy link
Collaborator

bvego commented Jun 30, 2019

Just like the .oneOf method, but with reverse logic. Check if the entry is not within the options

@bvego bvego added the good first issue Good for newcomers label Jun 30, 2019
@bvego bvego changed the title Add notOneOf method to primitives Add primitive.notOneOf() Jun 30, 2019
@bvego bvego changed the title Add primitive.notOneOf() Add primitive().notOneOf() Jun 30, 2019
@jnaputi253
Copy link
Contributor

Wouldn't mind giving a try at the issue.

@bvego
Copy link
Collaborator Author

bvego commented Jul 1, 2019

Sure thing! 😄

Assigned the issue to you!

Thanks for contributing!

@jnaputi253
Copy link
Contributor

Is it fine if I make a branch or should I fork the repo?

And happy to help! First time with TypeScript so it might take me a little bit to get used to typed JavaScript :)

@bvego
Copy link
Collaborator Author

bvego commented Jul 1, 2019

I'd prefer if you'd fork the repo!

If you get stuck on something feel free to ask! 😄

@jnaputi253
Copy link
Contributor

+1

@jnaputi253
Copy link
Contributor

For the #resolveNopeRef() method, would it be fine to make it a private class-level method since both #oneOf() and #notOneOf() would be using it?

@bvego
Copy link
Collaborator Author

bvego commented Jul 1, 2019

It sure does, but I'm afraid if we put it in the Primitive class that time will come when we'll have more complex classes that don't extend the class Primitive - that's why I made it a util 😄

@jnaputi253
Copy link
Contributor

Sounds good!

@jnaputi253
Copy link
Contributor

As a heads-up, gonna head out to work. The implementation is done and I wrote a couple of unit tests for it so far. I'll go ahead and wrap up the tests tonight (or later today if I can find the free time) and create a PR for it.

@bvego
Copy link
Collaborator Author

bvego commented Jul 1, 2019

Awesome man, thanks a lot! have a great day t work 😄

@jnaputi253
Copy link
Contributor

Started the PR.

Let me know if anything needs to be fixed 😄

@bvego
Copy link
Collaborator Author

bvego commented Jul 2, 2019

Thanks for your contribution! Closing this issue since its implemented 😄

@bvego bvego closed this as completed Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants