ExperimentalReadonly ExperimentalargsA completed args object.
ExperimentalExperimentalPrefix to print, not including the VariableInspector.type.
Optional. Whether to skip the _formatter functions. Default false.
ExperimentalString to print for variable type.
In the case of non-Object objects with a constructor, the class name is displayed.
Optional. Whether to skip the _formatter functions. Default false.
ExperimentalRepresentation of the variable’s value to print, not including the VariableInspector.type or VariableInspector.prefix.
Optional. Whether to skip the _formatter functions. Default false.
ExperimentalPassing the variable to inspect within an single-prop object
Optionalconsole: ConsoleUtility<any[]>ExperimentalPrint the contents to the console.
ExperimentalOverrides the default function to return a string representation of the inspected variable’s value.
Protected_ExperimentalApplies any formatting functions as defined in the args.
The stage being formatted.
Value to format.
Formatted value.
Protected_Protected_ExperimentalBuilds an array of the property names. Used by VariableInspector._indexProperties
Protected_ExperimentalBuilds an array of the properties for the current VariableInspector._inspectionValue| this._inspectionValue.
Protected Readonly Experimental_Value to inspect.
Protected Readonly Experimental_Value’s name, used in output.
Protected_ExperimentalProtected Readonly Experimental_These are the properties of the input object, if any.
Protected Readonly Experimental_Value to inspect as passed to the constructor.
Protected Readonly Experimental_Alias for this.typeOf( this._rawValue ).
Protected_ExperimentalValidates the first input parameter to ensure it is an object with a single string key.
Protected_ExperimentalReturns an instance of this class that inherits this instances’s args.
Meant for children/recursion of this inspection.
StaticdumpExperimentalAlias for new VariableInspector( ...).dump().
StaticsampleExperimentalPrints sample output to the console via VariableInspector.dump().
Optional_args: Partial<VariableInspector.Args>Optional_console: ConsoleUtility<any[]>An example, constructed instance for a sample object.
StaticsampleStaticstringifyExperimentalAlias for new VariableInspector( ...).toString().
Protected_ExperimentalCreates a readable representation of VariableInspector._inspectionValue as if its type is object (including arrays).
Readonly ExperimentalconsoleProtected Readonly Experimental_Default name for unnamed variables passed for inspection.
Protected_ExperimentalFilters for the ouput of different inspection parts.
Readonlytype: (type: string, skipFormatting: boolean) => stringFilters the value's type for output.
Readonlyvalue: (Filters the value for output.
ReadonlyvalueVia: (viaMethod: string, skipFormatting: boolean) => stringAdd 'via' info to value filter.
Inspects the value of a variable for debugging.
Can statically return a readable string (VariableInspector.stringify) or output it straight to console (VariableInspector.dump). By constructing an instance, you can get individual parts of the output inspection (VariableInspector.prefix, VariableInspector.type, VariableInspector.value) or get a json-compatible object representing the inspected value VariableInspector.toJSON.
Since
0.1.1
Since
2.0.0-beta.3 — Added support for objects with public
toVariableInspection()method to change the value to be inspected. Added T_InspectionType type param.Example