Skip to content

Instantly share code, notes, and snippets.

@khaosdoctor
Created April 6, 2019 18:21
Show Gist options
  • Save khaosdoctor/c2a0a00f4ba1bb07fdff5eff0483e3f0 to your computer and use it in GitHub Desktop.
Save khaosdoctor/c2a0a00f4ba1bb07fdff5eff0483e3f0 to your computer and use it in GitHub Desktop.
const fs = require('fs')
fs.readFile('./arquivo.txt', (err, dados) => {
if (err) throw new Error(err)
fs.writeFile('./outroarquivo.txt', dados, (err) => {
if (err) throw new Error(err)
outraFuncaoAssincrona((err, dados) => {
const x = dados.split(',')
const y = x.map((e) => e.toUpperCase())
maisUmaFuncaoAssincrona(y, (err, resultado) => {
// continua
})
})
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment