code: function addQuotes(text, quoteChar) {
    var withquotes = text;
    if(!isQuotedString(text)) {
      var delim = quoteChar && quoteChar.length === 1 ? quoteChar : '"';
      withquotes = delim + text + delim;
    }
    return withquotes;
  }
docs: 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.