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

Method toString

projects/JavaScript/proto/test.js:290–310  ·  view source on GitHub ↗

* Convert enum to string * @this {!EnumTyped} * @returns {!string} Enum value string

()

Source from the content-addressed store, hash-verified

288 * @returns {!string} Enum value string
289 */
290 toString () {
291 if (this.value === EnumTyped.ENUM_VALUE_0.value) {
292 return 'ENUM_VALUE_0'
293 }
294 if (this.value === EnumTyped.ENUM_VALUE_1.value) {
295 return 'ENUM_VALUE_1'
296 }
297 if (this.value === EnumTyped.ENUM_VALUE_2.value) {
298 return 'ENUM_VALUE_2'
299 }
300 if (this.value === EnumTyped.ENUM_VALUE_3.value) {
301 return 'ENUM_VALUE_3'
302 }
303 if (this.value === EnumTyped.ENUM_VALUE_4.value) {
304 return 'ENUM_VALUE_4'
305 }
306 if (this.value === EnumTyped.ENUM_VALUE_5.value) {
307 return 'ENUM_VALUE_5'
308 }
309 return '<unknown>'
310 }
311
312 /**
313 * Inspect enum

Callers 15

[util.inspect.custom]Method · 0.95
toStringMethod · 0.45
toJSONMethod · 0.45
toStringMethod · 0.45
toJSONMethod · 0.45
toStringMethod · 0.45
toJSONMethod · 0.45
toStringMethod · 0.45
toJSONMethod · 0.45
toStringMethod · 0.45
toJSONMethod · 0.45
toStringMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected