MCPcopy Create free account
hub / github.com/abue-ammar/tinycast / encodeInto

Method encodeInto

Scripts/raycast-runtime/src/polyfills.js:612–617  ·  view source on GitHub ↗
(text, target)

Source from the content-addressed store, hash-verified

610 return utf8Encode(String(text));
611 }
612 encodeInto(text, target) {
613 const bytes = utf8Encode(String(text));
614 const written = Math.min(bytes.length, target.length);
615 target.set(bytes.subarray(0, written));
616 return { read: text.length, written };
617 }
618 };
619}
620

Callers

nothing calls this directly

Calls 3

utf8EncodeFunction · 0.85
setMethod · 0.65
subarrayMethod · 0.45

Tested by

no test coverage detected