Skip to content

Instantly share code, notes, and snippets.

@alanhoff
Created September 9, 2014 12:38
Show Gist options
  • Select an option

  • Save alanhoff/c29427802b33153a1d07 to your computer and use it in GitHub Desktop.

Select an option

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