function safe(str, col)
		{
			if (typeof str === 'undefined' || str === null)
				return '';

			if (str.constructor === Date)
				return JSON.stringify(str).slice(1, 25);

			if (_escapeFormulae === true && typeof str === "string" && (str.match(/^[=+\-@].*$/) !== null)) {
				str = "'" + str;
			}

			var escapedQuoteStr = str.toString().replace(quoteCharRegex, _escapedQuote);

			var needsQuotes = (typeof _quotes === 'boolean' && _quotes)
							|| (typeof _quotes === 'function' && _quotes(str, col))
							|| (Array.isArray(_quotes) && _quotes[col])
							|| hasAny(escapedQuoteStr, BAD_DELIMITERS)
							|| escapedQuoteStr.indexOf(_delimiter) > -1
							|| escapedQuoteStr.charAt(0) === ' '
							|| escapedQuoteStr.charAt(escapedQuoteStr.length - 1) === ' ';

			return needsQuotes ? _quoteChar + escapedQuoteStr + _quoteChar : escapedQuoteStr;
		}
/** Encloses a value around quotes if needed (makes a value safe for CSV insertion) */
Encloses a value around quotes if needed (makes a value safe for CSV insertion)
Encloses a value around quotes if needed ( makes a value safe for CSV insertion )
function safe(str, col)
		{
			if (typeof str === 'undefined' || str === null)
				return '';
			if (str.constructor === Date)
				return JSON.stringify(str).slice(1, 25);
			if (_escapeFormulae === true && typeof str === "string" && (str.match(/^[=+\-@].*$/) !== null)) {
				str = "'" + str;
			}
			var escapedQuoteStr = str.toString().replace(quoteCharRegex, _escapedQuote);
			var needsQuotes = (typeof _quotes === 'boolean' && _quotes)
							|| (typeof _quotes === 'function' && _quotes(str, col))
							|| (Array.isArray(_quotes) && _quotes[col])
							|| hasAny(escapedQuoteStr, BAD_DELIMITERS)
							|| escapedQuoteStr.indexOf(_delimiter) > -1
							|| escapedQuoteStr.charAt(0) === ' '
							|| escapedQuoteStr.charAt(escapedQuoteStr.length - 1) === ' ';
			return needsQuotes ? _quoteChar + escapedQuoteStr + _quoteChar : escapedQuoteStr;
		}
function safe ( str , col ) { if ( typeof str === 'undefined' || str === null ) return '' ; if ( str . constructor === Date ) return JSON . stringify ( str ) . slice ( 1 , 25 ) ; if ( _escapeFormulae === true && typeof str === "string" && ( str . match ( / ^[=+\-@].*$ / ) !== null ) ) { str = "'" + str ; } var escapedQuoteStr = str . toString ( ) . replace ( quoteCharRegex , _escapedQuote ) ; var needsQuotes = ( typeof _quotes === 'boolean' && _quotes ) || ( typeof _quotes === 'function' && _quotes ( str , col ) ) || ( Array . isArray ( _quotes ) && _quotes [ col ] ) || hasAny ( escapedQuoteStr , BAD_DELIMITERS ) || escapedQuoteStr . indexOf ( _delimiter ) > - 1 || escapedQuoteStr . charAt ( 0 ) === ' ' || escapedQuoteStr . charAt ( escapedQuoteStr . length - 1 ) === ' ' ; return needsQuotes ? _quoteChar + escapedQuoteStr + _quoteChar : escapedQuoteStr ; }
Encloses a value around quotes if needed (makes a value safe for CSV insertion)
Encloses a value around quotes if needed ( makes a value safe for CSV insertion )