Methods
onRetrieve(bit) → {boolean}
Convert the "bit" to a boolean.
Parameters:
Name | Type | Description |
---|---|---|
bit |
number | Buffer | Either an instance of a Buffer containing a 1 or a 0, or a number. |
- Source:
Returns:
The bit's representation as a boolean.
- Type
- boolean
onSave(bool) → {number}
Convert a boolean to a bit.
Parameters:
Name | Type | Description |
---|---|---|
bool |
boolean | A boolean value. |
- Source:
Returns:
The boolean's representation as a number (1 or 0),
or null if bool is null or undefined.
- Type
- number