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

Method bytes

lib/internal/blob.js:311–318  ·  view source on GitHub ↗

* @returns {Promise }

()

Source from the content-addressed store, hash-verified

309 * @returns {Promise<Uint8Array>}
310 */
311 bytes() {
312 if (!isBlob(this))
313 return PromiseReject(new ERR_INVALID_THIS('Blob'));
314
315 return PromisePrototypeThen(
316 arrayBuffer(this),
317 (buffer) => new Uint8Array(buffer));
318 }
319
320 /**
321 * @returns {ReadableStream}

Callers 1

decompressDataFunction · 0.95

Calls 2

isBlobFunction · 0.85
arrayBufferFunction · 0.70

Tested by

no test coverage detected