Skip to content

Instantly share code, notes, and snippets.

@herber
Last active October 26, 2017 20:21
Show Gist options
  • Save herber/c8df78dd00ea4fb2d1e7bfad89a3dff2 to your computer and use it in GitHub Desktop.
Save herber/c8df78dd00ea4fb2d1e7bfad89a3dff2 to your computer and use it in GitHub Desktop.
Simple logger in js
const l => (type) {
return (text) => {
console.log(`${ type } - ${ text }`);
};
}
module.exports = l;
const l = require('./log')('usage file');
l('Hello World');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment