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 Value.IsXxx #253

Closed
gavv opened this issue Jan 28, 2023 · 2 comments · Fixed by #257
Closed

Add Value.IsXxx #253

gavv opened this issue Jan 28, 2023 · 2 comments · Fixed by #257
Assignees
Labels
feature New feature or request good first issue Good for newcomers help wanted Contributions are welcome important Important task
Milestone

Comments

@gavv
Copy link
Owner

gavv commented Jan 28, 2023

Value has several methods to cast value to specific type:

  • Object
  • Array
  • String
  • Number
  • Boolean

Each of them checks that the value has correct type and returns a new object for the value.

For each of these methods, we should add a counterpart method IsXxx (e.g. IsObject for Object) which just checks that the value has specific type, but does not create a new object, but instead returns the original (receiver) object.

New methods should have documentation comments and unit tests.

Related: #252

@gavv gavv added feature New feature or request help wanted Contributions are welcome good first issue Good for newcomers important Important task labels Jan 28, 2023
@nhAnik
Copy link
Contributor

nhAnik commented Jan 29, 2023

Hi @gavv , can I work on this?

@gavv
Copy link
Owner Author

gavv commented Jan 29, 2023

You're welcome!

@nhAnik nhAnik mentioned this issue Jan 31, 2023
@gavv gavv closed this as completed in #257 Feb 1, 2023
@gavv gavv added this to the v2 milestone Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue Good for newcomers help wanted Contributions are welcome important Important task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants