# uint48be

> Encode / decode big endian unsigned 48 bit integers

Latest version **2.0.1** (published 2018-09-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install uint48be
pnpm add uint48be
yarn add uint48be
bun add uint48be
```

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2018-09-07 |
| First published | 2016-02-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/uint48be) |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Mathias Buus |
| Maintainers | mafintosh |

## Links

- npm: https://www.npmjs.com/package/uint48be
- Repository: https://github.com/mafintosh/uint48be
- Issues: https://github.com/mafintosh/uint48be/issues
- npm.io page: https://npm.io/package/uint48be

## Recent versions

- 2.0.1 (latest) — 2018-09-07
- 2.0.0 — 2018-09-07
- 1.0.2 — 2017-07-04
- 1.0.1 — 2017-07-04
- 1.0.0 — 2016-02-01

## README

# uint48be

Encode / decode big endian unsigned 48 bit integers

```
npm install uint48be
```

[![build status](http://img.shields.io/travis/mafintosh/uint48be.svg?style=flat)](http://travis-ci.org/mafintosh/uint48be)

## Usage

``` js
var uint48be = require('uint48be')

var buf = uint48be.encode(42) // returns a 6 byte buffer with 42 encoded
console.log(uint48be.decode(buf)) // returns 42
```

## API

#### `buffer = uint48be.encode(num, [buffer], [offset])`

Encode a number as a big endian 48 bit unsigned integer.
Optionally you can pass a buffer + offset as the 2nd and 3rd argument
and the number will be encoded into that buffer at the given offset.

#### `num = uint48be.decode(buffer, [offset])`

Decode a number from a buffer.

#### `length = uint48be.encodingLength(num)`

Always returns `6`. Added to comply with the standard encoding interface in node.
Similarly `uint48be.encode.bytes` and `uint48be.decode.bytes` is also set to `6`.

## License

MIT

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