Created
February 3, 2016 19:13
-
-
Save mattcodez/617336258d243078f74f to your computer and use it in GitHub Desktop.
Mapreduce Debug (ES6 & ES5)
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
//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; | |
}; | |
} |
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
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