MCPcopy Create free account
hub / github.com/rmyndharis/OpenWA / encodeSegment

Function encodeSegment

sdk/javascript/src/http.ts:53–55  ·  view source on GitHub ↗
(segment: string | number)

Source from the content-addressed store, hash-verified

51 * readable.
52 */
53export function encodeSegment(segment: string | number): string {
54 return encodeURIComponent(String(segment)).replace(/%40/g, '@').replace(/%3A/g, ':').replace(/%2B/g, '+');
55}
56
57/** Build a URL with serialized query params, omitting `undefined`/`null` values. */
58export function buildUrl(baseUrl: string, path: string, query?: object): string {

Callers 15

sendMediaMethod · 0.85
infoMethod · 0.85
productsMethod · 0.85
productMethod · 0.85
sendProductMethod · 0.85
sendCatalogMethod · 0.85
listMethod · 0.85
fromContactMethod · 0.85
sendTextMethod · 0.85
sendImageMethod · 0.85
sendVideoMethod · 0.85
deleteMethod · 0.85

Calls

no outgoing calls

Tested by 1

testMethod · 0.68