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

Method toString

projects/JavaScript/proto/proto.js:514–553  ·  view source on GitHub ↗

* Convert flags to string * @this {!State} * @returns {!string} Flags value string

()

Source from the content-addressed store, hash-verified

512 * @returns {!string} Flags value string
513 */
514 toString () {
515 let result = ''
516 let first = true
517 if ((this.value & State.unknown.value) && ((this.value & State.unknown.value) === State.unknown.value)) {
518 result += (first ? '' : '|') + 'unknown'
519 // noinspection JSUnusedAssignment
520 first = false
521 }
522 if ((this.value & State.invalid.value) && ((this.value & State.invalid.value) === State.invalid.value)) {
523 result += (first ? '' : '|') + 'invalid'
524 // noinspection JSUnusedAssignment
525 first = false
526 }
527 if ((this.value & State.initialized.value) && ((this.value & State.initialized.value) === State.initialized.value)) {
528 result += (first ? '' : '|') + 'initialized'
529 // noinspection JSUnusedAssignment
530 first = false
531 }
532 if ((this.value & State.calculated.value) && ((this.value & State.calculated.value) === State.calculated.value)) {
533 result += (first ? '' : '|') + 'calculated'
534 // noinspection JSUnusedAssignment
535 first = false
536 }
537 if ((this.value & State.broken.value) && ((this.value & State.broken.value) === State.broken.value)) {
538 result += (first ? '' : '|') + 'broken'
539 // noinspection JSUnusedAssignment
540 first = false
541 }
542 if ((this.value & State.good.value) && ((this.value & State.good.value) === State.good.value)) {
543 result += (first ? '' : '|') + 'good'
544 // noinspection JSUnusedAssignment
545 first = false
546 }
547 if ((this.value & State.bad.value) && ((this.value & State.bad.value) === State.bad.value)) {
548 result += (first ? '' : '|') + 'bad'
549 // noinspection JSUnusedAssignment
550 first = false
551 }
552 return result
553 }
554
555 /**
556 * Inspect flags

Callers 15

[util.inspect.custom]Method · 0.95
toStringMethod · 0.45
toStringMethod · 0.45
toStringMethod · 0.45
toStringMethod · 0.45
toStringMethod · 0.45
toStringMethod · 0.45
send_OrderMessageMethod · 0.45
send_BalanceMessageMethod · 0.45
send_AccountMessageMethod · 0.45
onReceiveMethod · 0.45
send_OrderMessageMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected