Skip to content

Add synchronous version of Verimail.verify#11

Open
brpvieira wants to merge 2 commits intoamail:masterfrom
brpvieira:master
Open

Add synchronous version of Verimail.verify#11
brpvieira wants to merge 2 commits intoamail:masterfrom
brpvieira:master

Conversation

@brpvieira
Copy link
Copy Markdown

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
Copy Markdown
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