Created
September 9, 2014 12:38
-
-
Save alanhoff/c29427802b33153a1d07 to your computer and use it in GitHub Desktop.
Encapsulamento
This file contains 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
// Faz o no terminal de acordo com o contexto do log | |
module.exports = function(contexto){ | |
return { | |
error: function(texto){ | |
console.error('%s %s', contexto, texto); | |
}, | |
log: function(texto){ | |
console.log('%s %s', contexto, texto); | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment