0.0.1 • Published 6 years ago

structbuf v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Structbuf

Create a Structured buffer.

Installation

From NPM:

import {StructuredBufferArray} from 'structbuf';

const struct = {
  a: 1,
  b: 5,
  c: 2,
};

const buffer = StructuredBufferArray(struct, 100);

const data0 = buffer.get(0);
data0.b = 0x12;
data0.c = 0x11;

console.log(data0.b); // 18
console.log(data0.c); // 17