MCPcopy Create free account
hub / github.com/Kong/insomnia / decodeEncoding

Function decodeEncoding

packages/insomnia/src/common/templating/utils.ts:132–144  ·  view source on GitHub ↗
(value: T)

Source from the content-addressed store, hash-verified

130}
131
132export function decodeEncoding<T>(value: T) {
133 if (typeof value !== 'string') {
134 return value;
135 }
136
137 const results = value.match(/^b64::(.+)::46b$/);
138
139 if (results) {
140 return base64ToUtf8(results[1]);
141 }
142
143 return value;
144}
145
146export function extractNunjucksTagFromCoords(
147 coordinates: { left: number; top: number },

Callers

nothing calls this directly

Calls 1

base64ToUtf8Function · 0.90

Tested by

no test coverage detected