Guest User

Untitled

a guest
Jan 9th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. function partial(fn /*, rest args */){
  2. return fn.bind.apply(fn, Array.apply(null, arguments).slice(1));
  3. }
  4.  
  5. const Logger = {
  6. log(level, dateFormat, msg) {
  7. console.log(level, dateFormat, msg);
  8. }
  9. };
  10.  
  11. const info = partial(Logger.log, "info", "ISO8601");
  12. info("Application started");
Add Comment
Please, Sign In to add comment