You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 20, 2021. It is now read-only.
Ran into an issue the other day of trying to detect the case when a serialize fails (due to validateInput returning errors). I had resorted to a once listener for the invalid event and then cancelling the listener if serialize passes.
I think a better solution would be for serialize to either return a promise or accept an error callback (or both—success and error callbacks could be sugar on a promise).
Anyway, I'd be willing to submit this patch, I just wanted to gauge interest first.
Thoughts?
The text was updated successfully, but these errors were encountered:
promises: we're not going to convert a single API to this due to both overhead of including a promises library and having just one API using promises is weird.
callback: This seems reasonable as there is already another callback here. Glad to look at a PR.
Ran into an issue the other day of trying to detect the case when a serialize fails (due to
validateInput
returning errors). I had resorted to aonce
listener for theinvalid
event and then cancelling the listener ifserialize
passes.I think a better solution would be for
serialize
to either return a promise or accept an error callback (or both—success and error callbacks could be sugar on a promise).Anyway, I'd be willing to submit this patch, I just wanted to gauge interest first.
Thoughts?
The text was updated successfully, but these errors were encountered: