salsita/xml2js-schema — comment on commit 015aca8b5586b8ea9ec316028338505b63328d28
File: tests/js/specs/test-xml2js.js line 80
By matthewgertner:

The asynchronous nature is only relevant if the input to the SAX parser is chunked. Since write() is being called with the whole string, the parser completes and invokes the "end" or "error" callbacks in the same thread of execution. So when parseString() returns we can count on the relevant callback having already been invoked.