src/js/util/parse-utils.js
function detectDelimiter(input) {
	var numRows = input.split(/\r\n|\r|\n/).length;
	var numTabs = input.replace(tabRegex, "").length;

	if (numTabs >= numRows - 1) {
		return "\t";
	} else {
		return ",";
	}
}
function detectDelimiter(input) {
	var numRows = input.split(/\r\n|\r|\n/).length;
	var numTabs = input.replace(tabRegex, "").length;

	if (numTabs >= numRows - 1) {
		return "\t";
	} else {
		return ",";
	}
}
function detectDelimiter ( input ) { var numRows = input . split ( / \r\n|\r|\n / ) . length ; var numTabs = input . replace ( tabRegex , "" ) . length ; if ( numTabs >= numRows - 1 ) { return "\t" ; } else { return "," ; } }
Detect delimiter of input algorithm: if numtabs >= numrows then TSV, else CSV
Detect delimiter of input algorithm : if numtabs > = numrows then TSV else CSV