MCPcopy
hub / github.com/JakeChampion/fetch / arrayBufferFromText

Function arrayBufferFromText

test/test.js:71–79  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

69}
70
71function arrayBufferFromText(text) {
72 var buf = new ArrayBuffer(text.length)
73 var view = new Uint8Array(buf)
74
75 for (var i = 0; i < text.length; i++) {
76 view[i] = text.charCodeAt(i)
77 }
78 return buf
79}
80
81function readArrayBufferAsText(buf) {
82 var view = new Uint8Array(buf)

Callers 2

testBodyExtractFunction · 0.85
test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…