MCPcopy Create free account
hub / github.com/mapbox/pbf / constructor

Method constructor

index.js:19–26  ·  view source on GitHub ↗

* @param {Uint8Array | ArrayBuffer} buf

(buf)

Source from the content-addressed store, hash-verified

17 * @param {Uint8Array | ArrayBuffer} buf
18 */
19 constructor(buf) {
20 this.buf = ArrayBuffer.isView(buf) ? buf : new Uint8Array(buf);
21 this.dataView = new DataView(this.buf.buffer);
22 this.pos = 0;
23 this.type = 0;
24 this._valueStart = -1;
25 this.length = this.buf.length;
26 }
27
28 /**
29 * @template T

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected