1.0.9 • Published 6 years ago

memorymap v1.0.9

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

MemoryMap

A class wrapper for mapping class properties into a buffer.

class Map extends MemoryMap {
  @Field(Byte) // 1
  Id: number;

  @Field(UInt) // 4
  Id2: number;

  @Field(BString(15)) // 16
  Name: string;
}

const Buff = Buffer.alloc(Map.Size); // 21

const a = new Map(Buff);

console.log(Buff);
a.Id = 12;
console.log(Buff);
a.Name = "Test Acc";
console.log(Buff);
1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago