code: function isEncoding(encoding) {
      if (typeof Buffer.isEncoding !== 'undefined')
          return Buffer.isEncoding(encoding);
      switch ((encoding + '').toLowerCase()) {
          case 'hex':
          case 'utf8':
          case 'utf-8':
          case 'ascii':
          case 'binary':
          case 'base64':
          case 'ucs2':
          case 'ucs-2':
          case 'utf16le':
          case 'utf-16le':
          case 'raw':
              return true;
      }
      return false;
  }
docs: backwards compatibility for < node 0.10