1.0.9 • Published 6 years ago

@lukaswozniak/binarytypes v1.0.9

Weekly downloads
-
License
ISC
Repository
github
Last release
6 years ago

BinaryTypes

BinaryTypes is a library with classes representing binary data types like bool, int, uint or string.

Installation

$ npm install @lukaswozniak/binarytypes

Usage

import { Bool, UInt32 } from "@lukaswozniak/binarytypes"

// create objects
const trueBoolean = new Bool(true);
const falseBoolean = new Bool(Buffer.from([0]));
const uint = new UInt32(12345);
const uint2 = new UInt32(Buffer.from([0x39, 0x30]));

// read values
const trueValue: boolean = trueBoolean.value;
const value12345: number = uint.value;
const data12345: Buffer = uint.data;

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

ISC

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