errors-bitfield
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

errors-bitfield

A bit less to write.

The bitfield module lets you easily work with bitfield values, instead of working with actual bits, errors-bitfield uses positions, Meaning that you only enable or disable positions and not bits.

Installation

yarn add errors-bitfield

Usage

// import
import Bitfield from "errors-bitfield";
const bits = new Bitfield();
bits.add(1, 3, 5);
console.log(bits.bit); // 21
bits.remove(5);
console.log(bits.bit); // 5

Readme

Keywords

none

Package Sidebar

Install

npm i errors-bitfield

Weekly Downloads

3

Version

1.0.1

License

UNLICENSED

Unpacked Size

7.7 kB

Total Files

16

Last publish

Collaborators

  • ihack2712