code: function toBase64URL(data) {
      if (typeof data === 'string') {
          data = new Buffer(data);
      }
  
      return data.toString('base64')
          .replace(/=+/g, '')     // remove '='s
          .replace(/\+/g, '-')    // '+' → '-'
          .replace(/\//g, '_');   // '/' → '_'
  }
docs: Encodes a buffer or a string into Base64url format
  
  @param {Buffer|String} data The data to convert
  @return {String} The encoded string