(value = "")
| 6 | const textEncoder = new TextEncoder(); |
| 7 | |
| 8 | export function getUtf8ByteLength(value = "") { |
| 9 | return textEncoder.encode(value ?? "").length; |
| 10 | } |
| 11 | |
| 12 | export function formatPostContentSize(bytes) { |
| 13 | return `${(bytes / 1000 / 1000).toFixed(2)} MB`; |
no outgoing calls
no test coverage detected