MCPcopy Create free account
hub / github.com/Treeki/BirdBridge / percentEncode

Function percentEncode

utils/oauth.ts:4–6  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

2import {CONFIG} from "../config.ts";
3
4function percentEncode(s: string): string {
5 return encodeURIComponent(s).replace(/['()*!]/g, c => `%${c.charCodeAt(0).toString(16).toUpperCase()}`);
6}
7
8async function buildHmacKey(consumerSecret: string, accessTokenSecret: string): Promise<CryptoKey> {
9 const string = percentEncode(consumerSecret) + '&' + percentEncode(accessTokenSecret);

Callers 3

buildHmacKeyFunction · 0.85
makeSignatureFunction · 0.85
requestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected