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

Method hasValue

projects/JavaScript/proto/fbe.js:2198–2205  ·  view source on GitHub ↗

* Checks if the object contains a value * @this {!FieldModelOptional} * @returns {!boolean} Optional has value flag

()

Source from the content-addressed store, hash-verified

2196 * @returns {!boolean} Optional has value flag
2197 */
2198 get hasValue () {
2199 if ((this._buffer.offset + this.fbeOffset + this.fbeSize) > this._buffer.size) {
2200 return false
2201 }
2202
2203 let fbeHasValue = this.readUInt8(this.fbeOffset)
2204 return fbeHasValue !== 0
2205 }
2206
2207 /**
2208 * Get the base field model value

Callers

nothing calls this directly

Calls 1

readUInt8Method · 0.45

Tested by

no test coverage detected