MCPcopy Index your code
hub / github.com/simstudioai/sim / encodeRfc2047

Function encodeRfc2047

apps/sim/tools/gmail/utils.ts:304–310  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

302 * @see https://github.com/googleapis/google-api-nodejs-client/blob/main/samples/gmail/send.js
303 */
304export function encodeRfc2047(value: string): string {
305 // eslint-disable-next-line no-control-regex
306 if (/^[\x00-\x7F]*$/.test(value)) {
307 return value
308 }
309 return `=?UTF-8?B?${Buffer.from(value, 'utf-8').toString('base64')}?=`
310}
311
312/**
313 * Encode string or buffer to base64url format (URL-safe base64)

Callers 3

utils.test.tsFile · 0.90
buildSimpleEmailMessageFunction · 0.85
buildMimeMessageFunction · 0.85

Calls 2

testMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected