# @lukaswozniak/binarytypes

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

Latest version **1.0.9** (published 2018-10-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install @lukaswozniak/binarytypes
pnpm add @lukaswozniak/binarytypes
yarn add @lukaswozniak/binarytypes
bun add @lukaswozniak/binarytypes
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2018-10-07 |
| First published | 2018-10-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 22.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Łukasz Woźniak |
| Maintainers | lukaswozniak |

## Links

- npm: https://www.npmjs.com/package/@lukaswozniak/binarytypes
- Repository: https://github.com/lukaswozniak/binarytypes
- Homepage: https://github.com/lukaswozniak/binarytypes#readme
- Issues: https://github.com/lukaswozniak/binarytypes/issues
- npm.io page: https://npm.io/package/@lukaswozniak/binarytypes

## Dependencies (3)

- [chai](https://npm.io/package/chai.md) ^4.2.0
- [@types/chai](https://npm.io/package/@types/chai.md) ^4.1.6
- [@types/node](https://npm.io/package/@types/node.md) ^10.11.4

## Recent versions

- 1.0.9 (latest) — 2018-10-07
- 1.0.8 — 2018-10-07
- 1.0.7 — 2018-10-07
- 1.0.6 — 2018-10-07
- 1.0.5 — 2018-10-07
- 1.0.4 — 2018-10-06
- 1.0.3 — 2018-10-06
- 1.0.2 — 2018-10-06
- 1.0.1 — 2018-10-05

## README

# BinaryTypes

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

## Installation

`$ npm install @lukaswozniak/binarytypes`

## Usage

```typescript
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](https://choosealicense.com/licenses/isc/)

---
_Source: https://npm.io/package/@lukaswozniak/binarytypes · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
