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 synchronous version of Verimail.verify #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

brpvieira
Copy link

Hi,
I needed to plug in verimail into a validation framework that requires synchronous validation methods. To get this done I extracted the synchronous portion of verify() into verifySync() and refactored vefify() to use verifySync() internally.
As it stands they are basically the exact same method with a different interface, given that the portion of verify() that would actually need to run asynchronously is commented out.

@typerandom
Copy link
Contributor

Others have also requested a synchronous approach. To provide a clean API I will probably just make it so that if no callback is provided to verify(...), the call is treated as synchronous. However, if a callback is provided, it will be asynchronous. Ie. mixed verify(string test[, function callback]).

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

Successfully merging this pull request may close these issues.

2 participants