dbg
dbg reference and configuration shared across Fortified ID products.
Extension containing debug utilities
describe
Section titled “describe”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)
Syntax
Section titled “Syntax”dbg.describe(value[, label])
Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
value | any | The value to describe. |
Example
Section titled “Example”dbg.describe('this is a string', 'string')
// Will output:--- Describing: string ---Type: stringValue: this is a stringLength: 16JSON? no