MCPcopy Create free account
hub / github.com/MultithreadedJSBook/code-samples / constructor

Method constructor

ch6-ring-buffer/ring-buffer.js:2–5  ·  view source on GitHub ↗
(meta/*: Uint32Array[3]*/, buffer /*: Uint8Array */)

Source from the content-addressed store, hash-verified

1class RingBuffer {
2 constructor(meta/*: Uint32Array[3]*/, buffer /*: Uint8Array */) {
3 this.meta = meta;
4 this.buffer = buffer;
5 }
6
7 get head() {
8 return this.meta[0];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected