Nodejs String Quote dequote()

Here you can find the source of dequote()

Method Source Code

/**/*from w w w.j  av a2s.  c  o m*/
 * Removes the quotes around a string.
 */
String.prototype.dequote = function() {
  return this.replace(/^"|"$/g, '');
}

Related

  1. quote(()
    String.prototype.quote = (function(){
        return '"' + this + '"';
    })
    
  2. quote()
    String.prototype.quote = function () {
        var c, i, l = this.length, o = '"';
        for (i = 0; i < l; i += 1) {
            c = this.charAt(i);
            if (c >= ' ') {
                if (c === '\\' || c === '"') {
                    o += '\\';
                o += c;
    ...
    
  3. quote(sym)
    String.prototype.quote = function(sym) {
        if (!sym) {
            sym = '"';
        return sym + this + sym;
    };