sl-types.js
function addQuotes(text, quoteChar) {
  var withquotes = text;
  if(!isQuotedString(text)) {
    var delim = quoteChar && quoteChar.length === 1 ? quoteChar : '"';
    withquotes = delim + text + delim;
  }
  return withquotes;
}
function addQuotes(text, quoteChar) {
  var withquotes = text;
  if(!isQuotedString(text)) {
    var delim = quoteChar && quoteChar.length === 1 ? quoteChar : '"';
    withquotes = delim + text + delim;
  }
  return withquotes;
}
function addQuotes ( text , quoteChar ) { var withquotes = text ; if ( ! isQuotedString ( text ) ) { var delim = quoteChar && quoteChar . length === 1 ? quoteChar : '"' ; withquotes = delim + text + delim ; } return withquotes ; }
add quotes around a string if there aren't any
otherwise return the string as given.
since we're adding the quotes we also escape quotes
within the string.
add quotes around a string if there aren t any otherwise return the string as given . since we re adding the quotes we also escape quotes within the string .