MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / writeBool

Method writeBool

projects/JavaScript/proto/fbe.js:841–847  ·  view source on GitHub ↗

* Write boolean value into the field model buffer * @this {!FieldModelBase} * @param {!number} offset Offset * @param {!boolean} value Boolean value

(offset, value)

Source from the content-addressed store, hash-verified

839 * @param {!boolean} value Boolean value
840 */
841 writeBool (offset, value) {
842 let byte = value ? 1 : 0
843 offset = offset >>> 0
844 offset += this._buffer.offset
845 this._buffer.checkValue(offset, 1, byte, 0, 0xFF)
846 this._buffer.buffer[offset] = (byte & 0xFF)
847 }
848
849 /**
850 * Write byte value into the field model buffer

Callers 2

setMethod · 0.80
setMethod · 0.80

Calls 1

checkValueMethod · 0.45

Tested by

no test coverage detected