csv-array.js
function(line) {
		var dataArray = [];
		var tempString="";
		var lineLength = line.length;
		var index=0;
		while(index<lineLength) {
			if(line[index]=='"') {
				var index2 = index+1;
				while(line[index2]!='"') {
					tempString+=line[index2];
					index2++;
				}
				dataArray.push(tempString);
				tempString = "";
				index = index2+2;
				continue;
			}
			if(line[index]!=",") {
				tempString += line[index];
				index++; continue;
			} 
			if(line[index]==",") {
				dataArray.push(tempString);
				tempString = "";
				index++;continue;
			}

		}
		dataArray.push(tempString);
		return dataArray;
	}
function(line) {
		var dataArray = [];
		var tempString="";
		var lineLength = line.length;
		var index=0;
		while(index<lineLength) {
			if(line[index]=='"') {
				var index2 = index+1;
				while(line[index2]!='"') {
					tempString+=line[index2];
					index2++;
				}
				dataArray.push(tempString);
				tempString = "";
				index = index2+2;
				continue;
			}
			if(line[index]!=",") {
				tempString += line[index];
				index++; continue;
			} 
			if(line[index]==",") {
				dataArray.push(tempString);
				tempString = "";
				index++;continue;
			}

		}
		dataArray.push(tempString);
		return dataArray;
	}
function ( line ) { var dataArray = [ ] ; var tempString = "" ; var lineLength = line . length ; var index = 0 ; while ( index < lineLength ) { if ( line [ index ] == '"' ) { var index2 = index + 1 ; while ( line [ index2 ] != '"' ) { tempString += line [ index2 ] ; index2 ++ ; } dataArray . push ( tempString ) ; tempString = "" ; index = index2 + 2 ; continue ; } if ( line [ index ] != "," ) { tempString += line [ index ] ; index ++ ; continue ; } if ( line [ index ] == "," ) { dataArray . push ( tempString ) ; tempString = "" ; index ++ ; continue ; } } dataArray . push ( tempString ) ; return dataArray ; }
returns data from a single line
returns data from a single line