# @ficlabapp/bitfield

> Bitfield manipulation

Latest version **1.0.11** (published 2021-01-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install @ficlabapp/bitfield
pnpm add @ficlabapp/bitfield
yarn add @ficlabapp/bitfield
bun add @ficlabapp/bitfield
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2021-01-04 |
| First published | 2021-01-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 12.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | erayd |

## Links

- npm: https://www.npmjs.com/package/@ficlabapp/bitfield
- Repository: https://github.com/ficlabapp/bitfield
- Issues: https://github.com/ficlabapp/bitfield/issues
- npm.io page: https://npm.io/package/@ficlabapp/bitfield

## Recent versions

- 1.0.11 (latest) — 2021-01-04
- 1.0.10 — 2021-01-04
- 1.0.9 — 2021-01-03
- 1.0.8 — 2021-01-03

## README

Bitfield
========

A generic bitfield manipulation class, used to abstract defined parts of a
BigInt as boolean or BigInt properties on an object.

## Usage

```javascript
// start with one integer property two bits wide at offset 4, initialised to zero
var b = new bitField({myProp: { offset: 4, size: 2 }, 0n);

// add a boolean property at offset 1
b.defineProperty("otherProp", 1);

// add another integer property two bits wide at offset 2
b.defineProperty("oneMoreProp", 2, 2);

// set some values
b.otherProp = true;
b.oneMoreProp = 3;
```

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