Amanda
Amanda copied to clipboard
Optionally call `validation` sync (without callback)
I've reviewed some JSON Schema validation libraries and found this one solid, but the async-only validation bugs me a lot. I've noticed that most other similar libraries support synchronous calls, and I tried to figure out how much work it would require to make Amanda optionally sync as well but got a bit stuck in the search. How hard would it be to allow sync calls at this stage? Async mostly makes sense for bigger amounts of data, but for most a sync call would make more sense.
+1 would be great
you can get a workaround by passing in function(err) { return err; } as your callback. Every function in amanda does return callback();, so it bubbles all the way back up.
@ProCynic Thanks, will try that out.
Never managed to get this to work actually, not sure why - runs async anyway for me.