Skip to content

Fortified IDDocs

dbg

dbg reference and configuration shared across Fortified ID products.

Extension containing debug utilities

Describes a value, prints the result to stdout and returns the value.

Output will contain:

  • Type ('string', 'array', 'object', 'number', etc)
  • Value (concatenated to 32 chars)
  • Length (if applicable)
  • If value is an array (when type is 'object')
  • If value is JSON (when type is 'string')
  • JSON-type (when parsed)
  • JSON-length (when parsed)

dbg.describe(value[, label])

NameTypeDescription
valueanyThe value to describe.
dbg.describe('this is a string', 'string')
// Will output:
--- Describing: string ---
Type: string
Value: this is a string
Length: 16
JSON? no