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

Function readBlobAsText

fetch.js:193–200  ·  view source on GitHub ↗
(blob)

Source from the content-addressed store, hash-verified

191}
192
193function readBlobAsText(blob) {
194 var reader = new FileReader()
195 var promise = fileReaderReady(reader)
196 var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type)
197 var encoding = match ? match[1] : 'utf-8'
198 reader.readAsText(blob, encoding)
199 return promise
200}
201
202function readArrayBufferAsText(buf) {
203 var view = new Uint8Array(buf)

Callers 1

BodyFunction · 0.70

Calls 1

fileReaderReadyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…