How to use the querystring.escape function in querystring

To help you get started, we’ve selected a few querystring examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github KiLMaN / T411-Torznab / server.js View on Github external
function researchMovie(show,context) {
	// _logger.debug(show);
	var showName = show['title'];
	_logger.debug("Researching for : " + showName);
	showName = showName.replace(/\([0-9]*\)/gmi, "").trim();
	showName = showName.replace(/\((US|FR|ES)\)/gmi, "").trim();
	showName = showName.replace(/['|"](s)*/gmi, "").trim();
	showName= require('querystring').escape(showName);

	_logger.debug("Clean Name : "+showName);
	var query = (context.req.query.q) ? context.req.query.q : showName;

	research( baseUrl + "/torrents/search/"+query ,reponseSearch.bind( {context: context} ),context.req.query);
}
function researchTvRage(show,context) {
github emil10001 / AWS-NodeJS-AngularJS-Demos / s3-demo / s3_utils.js View on Github external
s3.getSignedUrl('putObject', putParams, function (err, url) {
            if (!!err) {
                console.error(c.S3_GET_URLPAIR, err);
                socket.emit(c.S3_GET_URLPAIR, c.ERROR);
                return;
            }
            urlPair[c.S3_PUT_URL] = url;
            urlPair[c.S3_GET_URL] = "https://aws-node-demos.s3.amazonaws.com/" + qs.escape(key);
            socket.emit(c.S3_GET_URLPAIR, urlPair);
        });
    };
github jonschlinkert / markdown-toc / index.js View on Github external
function linkify(tok, options) {
  var opts = utils.merge({}, options);
  if (tok && tok.content) {
    opts.num = tok.seen;
    var text = titleize(tok.content, opts);
    var slug = utils.slugify(tok.content, opts);
    slug = querystring.escape(slug);
    if (opts && typeof opts.linkify === 'function') {
      return opts.linkify(tok, text, slug, opts);
    }
    tok.content = utils.mdlink(text, '#' + slug);
  }
  return tok;
}
github joola / joola / lib / sdk / common / api.js View on Github external
return Object.keys(obj).map(function (k) {
          if (Array.isArray(obj[k])) {
            return obj[k].map(function (v) {
              return querystring.escape(stringifyPrimitive(k)) +
                eq +
                querystring.escape(stringifyPrimitive(v));
            }).join(sep);
          } else {
            var result = querystring.escape(stringifyPrimitive(k)) +
              eq +
              querystring.escape(stringifyPrimitive(obj[k]));
            return result;
          }
        }).join(sep);

querystring

Node's querystring module for all engines.

MIT
Latest version published 4 years ago

Package Health Score

55 / 100
Full package analysis