MCPcopy Create free account
hub / github.com/nodejs/node / createImmutableTypedArray

Function createImmutableTypedArray

deps/v8/test/mjsunit/immutable-arraybuffer.js:166–170  ·  view source on GitHub ↗
(length = 10, type = Uint8Array)

Source from the content-addressed store, hash-verified

164})();
165
166function createImmutableTypedArray(length = 10, type = Uint8Array) {
167 const ab = new ArrayBuffer(length * type.BYTES_PER_ELEMENT);
168 const imm = ab.transferToImmutable();
169 return new type(imm);
170}
171
172// 1. Test TypedArray.prototype.copyWithin
173(function testCopyWithin() {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected