MCPcopy Index your code
hub / github.com/totaljs/framework / prepareBASE64

Function prepareBASE64

mail.js:967–982  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

965
966// Split Base64 to lines with 68 characters
967function prepareBASE64(value) {
968
969 var index = 0;
970 var output = '';
971 var length = value.length;
972
973 while (index < length) {
974 var max = index + 68;
975 if (max > length)
976 max = length;
977 output += value.substring(index, max) + CRLF;
978 index = max;
979 }
980
981 return output;
982}
983
984function unicode_encode(val) {
985 return val ? '=?utf-8?B?' + Buffer.from(val.toString()).toString('base64') + '?=' : '';

Callers 1

mail.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected