Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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