https://github.com/hazae41/bitset
Utilities for arithmetic bitwise operations in JavaScript
https://github.com/hazae41/bitset
arithmetic bitmask bits bitset bitwise browser javascript node typescript
Last synced: 6 months ago
JSON representation
Utilities for arithmetic bitwise operations in JavaScript
- Host: GitHub
- URL: https://github.com/hazae41/bitset
- Owner: hazae41
- Created: 2023-02-09T11:34:29.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-06T15:29:08.000Z (almost 2 years ago)
- Last Synced: 2025-03-04T04:34:54.737Z (7 months ago)
- Topics: arithmetic, bitmask, bits, bitset, bitwise, browser, javascript, node, typescript
- Language: TypeScript
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Bitset
DEPRECATED
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
.valueconst last6 = bitset
.last(6) // 00 0010
.toString() // "000010"
```