MCPcopy Create free account
hub / github.com/W4G1/multithreading / writeInitial

Method writeInitial

src/lib/json_buffer.ts:588–594  ·  view source on GitHub ↗
(target: Pointer, data: any)

Source from the content-addressed store, hash-verified

586 }
587
588 private writeInitial(target: Pointer, data: any) {
589 if (Array.isArray(data)) {
590 data.forEach((v, i) => this.arraySet(target, i, v));
591 } else {
592 Object.entries(data).forEach(([k, v]) => this.objectSet(target, k, v));
593 }
594 }
595
596 public objectHandler: ProxyHandler<any> = {
597 get: (target, prop, receiver) => {

Callers 1

initializeBufferMethod · 0.95

Calls 2

arraySetMethod · 0.95
objectSetMethod · 0.95

Tested by

no test coverage detected