MCPcopy Create free account
hub / github.com/chhoumann/quickadd / byteLength

Function byteLength

src/services/packagePreview.ts:968–973  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

966}
967
968function byteLength(text: string): number {
969 if (typeof TextEncoder !== "undefined") {
970 return new TextEncoder().encode(text).length;
971 }
972 return text.length;
973}
974
975function looksMinified(text: string): boolean {
976 if (text.length < 1000) return false;

Callers 1

decodeAssetPreviewFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected