MCPcopy Create free account
hub / github.com/jshttp/cookie / defaultEncode

Function defaultEncode

src/index.ts:529–531  ·  view source on GitHub ↗

* URL-encode string value. Optimized to skip native call for roundtrip-safe cookie-octet values.

(str: string)

Source from the content-addressed store, hash-verified

527 * URL-encode string value. Optimized to skip native call for roundtrip-safe cookie-octet values.
528 */
529function defaultEncode(str: string): string {
530 return cookieOctetRegExp.test(str) ? str : encodeURIComponent(str);
531}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…