MCPcopy Index your code
hub / github.com/nodejs/node / text

Method text

lib/internal/blob.js:297–306  ·  view source on GitHub ↗

* @returns {Promise }

()

Source from the content-addressed store, hash-verified

295 * @returns {Promise<string>}
296 */
297 text() {
298 if (!isBlob(this))
299 return PromiseReject(new ERR_INVALID_THIS('Blob'));
300
301 dec ??= new TextDecoder();
302
303 return PromisePrototypeThen(
304 arrayBuffer(this),
305 (buffer) => dec.decode(buffer));
306 }
307
308 /**
309 * @returns {Promise<Uint8Array>}

Callers 1

runFunction · 0.95

Calls 3

isBlobFunction · 0.85
arrayBufferFunction · 0.70
decodeMethod · 0.65

Tested by

no test coverage detected