MCPcopy Create free account
hub / github.com/ChromeDevTools/devtools-frontend / encodeBits

Function encodeBits

front_end/core/platform/StringUtilities.ts:145–147  ·  view source on GitHub ↗
(b: number)

Source from the content-addressed store, hash-verified

143 */
144
145 function encodeBits(b: number): number {
146 return b < 26 ? b + 65 : b < 52 ? b + 71 : b < 62 ? b - 4 : b === 62 ? 43 : b === 63 ? 47 : 65;
147 }
148 const encoder = new TextEncoder();
149 const data = encoder.encode(inputString.toString());
150 const n = data.length;

Callers 1

toBase64Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected