1

I am trying to understand if the method "parseStringPromise" and its counterpart "parseString" (which takes a callback) actually do I/O operations which require async.

Does anyone know if the callback was just a convention that was followed and the promisify was to continue that convention? Or is this truly an async operation?

If this is truly an async operation, could you enlighten me as to what actions are async within this function? My intuition is that the function does only in-memory operations and does not require I/O.

Thanks in advance!

  • I came across the same question these days: I'm wondering also why it is not a sync function without callback/promise. – Nevitones Mar 24 '20 at 19:53

1 Answers1

0

XML can reference other files so the parser may need to load those before it can generate the output