Skip to content

Instantly share code, notes, and snippets.

@alanhoff
Created September 9, 2014 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alanhoff/c29427802b33153a1d07 to your computer and use it in GitHub Desktop.
Save alanhoff/c29427802b33153a1d07 to your computer and use it in GitHub Desktop.
Encapsulamento
// 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