Created
April 15, 2016 19:35
-
-
Save indefinit/cb4242f0b0c8e842dbc4987393a76826 to your computer and use it in GitHub Desktop.
loadTable suggested changes
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
p5.prototype.loadTable = function (path) { | |
var callback = null; | |
var options = []; | |
var header = false; | |
var sep = ','; | |
var decrementPreload = p5._getDecrementPreload.apply(this, arguments); | |
var args = new Array(arguments.length); | |
for (var i = 0; i < args.length; ++i) { | |
args[i] = arguments[i]; | |
} | |
for (var i = 1; i < args.length; i++) { | |
if ((typeof (args[i]) === 'function') && | |
(args[i] !== decrementPreload)) { | |
callback = args[i]; | |
} else if (args[i] === true) { | |
options.push(args[i]); | |
header = true; | |
} | |
else if (arguments[i] === ',') { | |
sep = ','; | |
} else if (arguments[i] === '\t') { | |
sep = '\t'; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment