Open RobLoach opened 7 years ago
:question: Confused what you are asking for :confused:
Do we have to change our implementations at all for JSTransformers to be compatible with async
/await
?
@calebeby no. @RobLoach is talking about that we should make a note for users for the *Async
methods that they can use it with combination with async/await
syntax.
var md = require('jstrasformer')(require('jstransformer-marked')
async function myAsyncFn () {
const res = await md.renderAsync('some md')
console.log(res.body)
}
I believe :)
Ah. Ok
On Mon, Jan 16, 2017 at 9:09 PM, Charlike Mike Reagent < notifications@github.com> wrote:
@calebeby https://github.com/calebeby no. @RobLoach https://github.com/RobLoach is talking about that we should make a note for users for the *Async methods that they can use it with combination with async/await syntax.
var md = require('jstrasformer')(require('jstransformer-marked') async function myAsyncFn () { await md.renderAsync('some md') }
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jstransformers/jstransformer/issues/191#issuecomment-273024000, or mute the thread https://github.com/notifications/unsubscribe-auth/AMmFoQtmGv0LELr4w737bwBahcZnHwT_ks5rTEzxgaJpZM4LlDOQ .
Add docs on how to use this with async/await.