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 failure/success helpers to either.ts #82

Merged
merged 2 commits into from
Dec 18, 2023
Merged

Conversation

drdaemos
Copy link
Collaborator

@drdaemos drdaemos commented Nov 17, 2023

Changes

Added several helpers to Either functionality for ease and clarity of use:

  • isFailure(value) unwraps the Either value and tells if it has an error
  • isSuccess(value) unwraps the Either value and tells if it has a result
  • failure(error) wraps error into an Either
  • success(result) wraps result into an Either

Checklist

  • Apply one of following labels; major, minor, patch or skip-release
  • I've updated the documentation, or no changes were necessary
  • I've updated the tests, or no changes were necessary

@CarlosGamero
Copy link
Contributor

@drdaemos There is an issue with vite, I am fixing it on -> #80

@drdaemos drdaemos requested a review from rupert-mckay December 6, 2023 11:39
@rupert-mckay rupert-mckay merged commit 1ce9e3f into main Dec 18, 2023
4 checks passed
@rupert-mckay rupert-mckay deleted the feat/either-helpers branch December 18, 2023 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants