Created
April 6, 2019 18:14
-
-
Save khaosdoctor/0b3de82886e0b36d5f0d0c869645f9cd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function readFile (path, callback) { | |
if (!path) throw new Error('Path is required') | |
// Leitura do arquivo de forma assíncrona | |
// Criando err como variável de erros e data como variável com o conteúdo | |
callback(err, dados) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment