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

Method toString

projects/JavaScript/proto/protoex.js:3004–3040  ·  view source on GitHub ↗

* Convert struct to string * @this {!Account} * @returns {!string} Struct value string

()

Source from the content-addressed store, hash-verified

3002 * @returns {!string} Struct value string
3003 */
3004 toString () {
3005 let result = ''
3006 result += 'Account('
3007 result += 'id='
3008 result += this.id.toString()
3009 result += ',name='
3010 if (this.name != null) {
3011 result += '"' + this.name.toString() + '"'
3012 } else {
3013 result += 'null'
3014 }
3015 result += ',state='
3016 result += this.state.toString()
3017 result += ',wallet='
3018 result += this.wallet.toString()
3019 result += ',asset='
3020 if (this.asset != null) {
3021 result += this.asset.toString()
3022 } else {
3023 result += 'null'
3024 }
3025 result += ',orders='
3026 if (this.orders != null) {
3027 let first = true
3028 result += '[' + this.orders.length + ']['
3029 for (let item of this.orders) {
3030 result += first ? '' : ','
3031 result += item.toString()
3032 first = false
3033 }
3034 result += ']'
3035 } else {
3036 result += '[0][]'
3037 }
3038 result += ')'
3039 return result
3040 }
3041
3042 /**
3043 * Inspect struct

Callers 1

[util.inspect.custom]Method · 0.95

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected