hive/html/jquery/3rd/PapaParse-4.0.7/papaparse.js
// 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 "";
            str = str.toString().replace(/"/g, '""');
            var needsQuotes = (typeof _quotes === 'boolean' && _quotes)
                            || (_quotes instanceof Array && _quotes[col])
                            || hasAny(str, global.Papa.BAD_DELIMITERS)
                            || str.indexOf(_delimiter) > -1
                            || str.charAt(0) == ' '
                            || str.charAt(str.length - 1) == ' ';
            return needsQuotes ? '"' + str + '"' : str;
        }
function safe ( str , col ) { if ( typeof str === "undefined" || str === null ) return "" ; str = str . toString ( ) . replace ( / " / g , '""' ) ; var needsQuotes = ( typeof _quotes === 'boolean' && _quotes ) || ( _quotes instanceof Array && _quotes [ col ] ) || hasAny ( str , global . Papa . BAD_DELIMITERS ) || str . indexOf ( _delimiter ) > - 1 || str . charAt ( 0 ) == ' ' || str . charAt ( str . length - 1 ) == ' ' ; return needsQuotes ? '"' + str + '"' : str ; }
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 )