Skip to content

Bit

A Bit wrapper library that supports both 64-bit integers and 32-bit integers. Primarily required in the calculation for snowflake IDs that the Discord API will give us.

Properties

The Bit instance has no set properties!

Methods

The Bit instance has no set methods!

Functions

is32Bit

Bit . is32Bit (

     value: number
)  -> ()

Returns true if the given value is a 32-bit integer.

bnot

Bit . bnot (

     value: number
)  -> ()

Binary NOT operation for integers

bor

Bit . bor (

     value0: number
     value1: number
)  -> ()

Binary OR operation for integers

band

Bit . band (

     value0: number
     value1: number
)  -> ()

Binary AND operation for integers

shift

Bit . shift (

     value: number
     displacement: number
)  -> ()

Binary SHIFT operation for integers

lshift

Bit . lshift (

     value: number
     displacement: number
)  -> ()

Binary LEFT SHIFT operation for integers

rshift

Bit . rshift (

     value: number
     displacement: number
)  -> ()

Binary RIGHT SHIFT operation for integers