Skip to content

Instantly share code, notes, and snippets.

@sakunyo
Created December 16, 2011 04:37
Show Gist options
  • Save sakunyo/1484488 to your computer and use it in GitHub Desktop.
Save sakunyo/1484488 to your computer and use it in GitHub Desktop.
dataFormat()
function dataFormat(){
var t = "",
a = arguments,
i, l;
for( i = 0, l = a.length; i < l; i++ ){
if( a[i] !== undefined ){
if( a[i] === "" ){
t += '""';
}else{
t += a[i];
}
}
if( ( i + 1 ) !== a.length ){
t += ",";
}
}
//console.log(t);
return t;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment