ExperimentalReadonly ExperimentalargsA completed args object.
Experimental
Experimental
Prefix to print, not including the VariableInspector.type.
Optional. Whether to skip the _formatter functions. Default false.
Experimental
String 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.
Experimental
Representation of the variable’s value to print, not including the VariableInspector.type or VariableInspector.prefix.
Optional. Whether to skip the _formatter functions. Default false.
Experimental
Passing the variable to inspect within an single-prop object
Optionalconsole: ConsoleUtility<any[]>
Experimental
Print the contents to the console.
Experimental
Overrides the default function to return a string representation of the inspected variable’s value.
Protected_Experimental
Applies any formatting functions as defined in the args.
The stage being formatted.
Value to format.
Formatted value.
Protected_Protected_Experimental
Builds an array of the property names. Used by VariableInspector._indexProperties
Protected_Experimental
Builds 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_Experimental
Protected 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_Experimental
Validates the first input parameter to ensure it is an object with a single string key.
Protected_Experimental
Returns an instance of this class that inherits this instances’s args.
Meant for children/recursion of this inspection.
StaticdumpExperimental
Alias for new VariableInspector( ...).dump().
StaticsampleExperimental
Prints 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.
StaticsampleStaticstringifyExperimental
Alias for new VariableInspector( ...).toString().
Protected_Experimental
Creates 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_Experimental
Filters 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