MCPcopy Create free account
hub / github.com/Wscats/vscode-explore / alloc

Method alloc

contributes/src/vs/base/common/buffer.ts:19–25  ·  view source on GitHub ↗
(byteLength: number)

Source from the content-addressed store, hash-verified

17export class VSBuffer {
18
19 static alloc(byteLength: number): VSBuffer {
20 if (hasBuffer) {
21 return new VSBuffer(Buffer.allocUnsafe(byteLength));
22 } else {
23 return new VSBuffer(new Uint8Array(byteLength));
24 }
25 }
26
27 static wrap(actual: Uint8Array): VSBuffer {
28 if (hasBuffer && !(Buffer.isBuffer(actual))) {

Callers 1

concatMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected