There is nothing wrong with the callback style.
var return = doSomething();
...
doSomething(function(return) {
...
});
This is preference. They are both valid. The first one just seems “better” because you are used to it.
One good reason for the latter is that the API does not need to be changed when you change your library to non-blocking.
, node - -. - js2xml, , , node 0,6, API- - -, .
, API ( , ).