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

Convert tryCatch to nAry (#318) #320

Merged
merged 6 commits into from
Oct 27, 2018
Merged

Convert tryCatch to nAry (#318) #320

merged 6 commits into from
Oct 27, 2018

Conversation

karthikiyengar
Copy link
Collaborator

@karthikiyengar karthikiyengar commented Oct 5, 2018

No description provided.

@coveralls
Copy link

coveralls commented Oct 5, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling e95f4d1 on try-catch into eb82706 on master.

Copy link
Owner

@evilsoft evilsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This 👀 GTG!
As we are changing the interface for this, thinking it should be marked as a Breaking Change.
We are going to do a 0.10.2 release with some features and a bug fix, then this should go out with 0.11.0 which will be the release after this next one.

What do you think about updating the documentation to make note of this new super power?
image

@karthikiyengar
Copy link
Collaborator Author

karthikiyengar commented Oct 7, 2018 via email

const noncurried = tryCatch(x, 1,2,3).either(identity, identity)
const curried = tryCatch(x, 1)(2)(3).either(identity, identity)

t.equals(equals(noncurried, { a: 1, b: 2, c: 3 }), true, 'preserves the arity of the passed function')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of equals with an equals function checking for true, tape provides same.
But this is okay, I have done this a lot myself and it still is a vaild test

@evilsoft evilsoft merged commit f7641f3 into master Oct 27, 2018
@evilsoft evilsoft deleted the try-catch branch October 27, 2018 19:30
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