Skip to content

Instantly share code, notes, and snippets.

View carrierdown's full-sized avatar

Knut Andreas Ruud carrierdown

View GitHub Profile
@carrierdown
carrierdown / debugLog.js
Last active April 16, 2019 07:41
Drop-in replacement for post()
function debugLog(/* ... args */) {
var result = "";
for (var i = 0; i < arguments.length; i++) {
result += (i !== 0 && i < arguments.length ? " " : "") + debugPost(arguments[i], "");
}
post(result + "\r\n");
}
function debugPost(val, res) {
if (Array.isArray(val)) {