Created
December 4, 2017 16:09
-
-
Save BukhariH/a4f6b744e038f7a3649442902a5594c6 to your computer and use it in GitHub Desktop.
Simple ES6 Logger
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
const logger = (() => { | |
let log = ""; | |
return { | |
add: msg => log += msg + "\n", | |
show: () => console.log(log) | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment