MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / encodeRFC3986URIComponent

Function encodeRFC3986URIComponent

packages/web/src/lib/utils.ts:68–73  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

66
67// @see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent#encoding_for_rfc3986
68const encodeRFC3986URIComponent = (str: string) => {
69 return encodeURIComponent(str).replace(
70 /[!'()*]/g,
71 (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`,
72 );
73 }
74
75type AuthProviderInfo = {
76 id: string;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected