lire la chaîne à l'aide de nodejs de flux

const stream: InstanceType<typeof PassThrough> = new PassThrough()
stream.write(html)
stream.end()

stream.pipe(createWriteStream(writeFilePath)).on('finish', () => {
  console.info('generate file is working')
})
Restu Wahyu Saputra