MCPcopy Index your code
hub / github.com/mailvelope/mailvelope / byteCount

Function byteCount

src/lib/util.js:174–176  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

172 * @returns {number}
173 */
174export function byteCount(str) {
175 return encodeURI(str).split(/%..|./).length - 1;
176}
177
178export function ab2str(buf) {
179 const ab = new Uint8Array(buf);

Callers 4

buildMailFunction · 0.90
buildMailWithHeaderFunction · 0.90
sendMessageFunction · 0.90
encryptFilesMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected