# @hazae41/bitset

> Utilities for arithmetic bitwise operations in JavaScript

Latest version **1.0.1** (published 2023-02-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @hazae41/bitset
pnpm add @hazae41/bitset
yarn add @hazae41/bitset
bun add @hazae41/bitset
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2023-02-09 |
| First published | 2023-02-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 23.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | hazae41 |
| Maintainers | hazae41 |
| Keywords | bitset, big-endian, little-endian, not, encoding, decoding, buffer, bits, bytes, protocol, packets, der, ber, octets, stream, low-level, typescript, esmodules, tested, unit-tested |

## Links

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

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2023-02-09
- 1.0.0 — 2023-02-09

## README

# Bitset

Utilities for arithmetic bitwise operations in JavaScript

```bash
npm i @hazae41/bitset
```

[**Node Package 📦**](https://www.npmjs.com/package/@hazae41/bitset)

### Current features
- 100% TypeScript and ESM
- Unit-tested
- Big-endian and little-endian
- Export to uint32
- Builder pattern

### Usage

```typescript
const bitset = new Bitset(0x00, 8)

const result = bitset
  .toggleLE(1) // 0000 0010
  .toggleBE(1) // 0100 0010
  .unsign() // >>> 0
  .value

const last6 = bitset
  .last(6) // 00 0010
  .toString() // "000010"
```

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