MCPcopy
hub / github.com/parse-community/parse-server / encodeForUrl

Method encodeForUrl

src/Utils.js:481–485  ·  view source on GitHub ↗

* Encodes a string to be used in a URL. * @param {String} input The string to encode. * @returns {String} The encoded string.

(input)

Source from the content-addressed store, hash-verified

479 * @returns {String} The encoded string.
480 */
481 static encodeForUrl(input) {
482 return encodeURIComponent(input).replace(/[!'.()*]/g, char =>
483 '%' + char.charCodeAt(0).toString(16).toUpperCase()
484 );
485 }
486
487 /**
488 * Creates a JSON replacer function that handles Map, Set, and circular references.

Callers 1

Utils.spec.jsFile · 0.80

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected