Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/harmony/src/utils/bitfield.ts>BitField

An easy to use Discord API Library for Deno.
Go to Latest
class BitField
import { BitField } from "https://deno.land/x/harmony@v2.8.0/src/utils/bitfield.ts";

Bit Field utility to work with Bits and Flags

Constructors

new
BitField(flags: { [name: string]: number | bigint; }, bits: BitFieldResolvable)

Properties

bitfield: bigint

Methods

any(bit: BitFieldResolvable): boolean
equals(bit: BitFieldResolvable): boolean
flags(): { [name: string]: bigint | number; }
freeze(): Readonly<BitField>
has(bit: BitFieldResolvable, ..._: unknown[]): boolean
missing(bits: BitFieldResolvable, ...hasParams: unknown[]): BitFieldResolvable[]
serialize(...hasParams: unknown[]): { [key: string]: boolean; }
toArray(...hasParams: unknown[]): string[]
toJSON(): string
valueOf(): bigint
[Symbol.iterator](): Iterator<string>

Static Methods

resolve(flags: Record<string, bigint | number>, bit?: BitFieldResolvable): bigint