Skip to content

Instantly share code, notes, and snippets.

@mattcodez
Created February 3, 2016 19:13
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 mattcodez/617336258d243078f74f to your computer and use it in GitHub Desktop.
Save mattcodez/617336258d243078f74f to your computer and use it in GitHub Desktop.
Mapreduce Debug (ES6 & ES5)
//Transpiled from Babel
"use strict";
function MRDbg() {
for (var _len = arguments.length, txt = Array(_len), _key = 0; _key < _len; _key++) {
txt[_key] = arguments[_key];
}
return function (prev, cur, i, arr) {
if (i === 1) {
console.log.apply(console, [].concat(txt, [arr]));
}
return arr;
};
}
function MRDbg(...txt){
return function(prev, cur, i, arr){
if (i === 1){
console.log.apply(console, [...txt, arr]);
}
return arr;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment