ExperimentalExperimentalPassing the variable to inspect within an single-prop object
Function ExperimentalmergeAn alias for this package's mergeArgs().
Inputs can be undefined, and if so, the default is returned.
Default object type.
Default values (if not specified in inputs).
Optionalinputs: undefinedOverriding values (changes to make).
Optionalrecursive: booleanOptional. Whether to merge the object recursively. Default false.
OptionalmergeArrays: booleanResulting object with all the defaults and inputs keys with
either default values or input values, as appropriate.
Passing recursive as false means that the input type must be a Partial
(not RecursivePartial).
Optionalrecursive: falseOptionalmergeArrays: booleanPassing recursive as true means that the input type may actually be a
RecursivePartial.
OptionalmergeArrays: booleanUniversal overload.
Optionalinputs: IOptionalrecursive: booleanOptionalmergeArrays: booleanProtected Readonly Experimental_nameValue’s name, used in output.
Protected Readonly Experimental_propertiesThese are the properties of the input object, if any.
Protected Readonly Experimental_rawValue to inspect.
Protected Readonly Experimental_typeAlias for this.typeOf( this._rawValue ).
StaticsampleInternalUsed for testing.
Private Static_testInternalUsed for testing.
ExperimentalExperimentalBuild a complete args object.
Optionalargs: Partial<VariableInspector.Args> | RecursivePartial<VariableInspector.Args>ExperimentalPrefix 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.
ExperimentalPrint the contents to the console.
ExperimentalOverrides the default function to return a string representation of the inspected variable’s value.
ProtectedformatterExperimentalApplies any formatting functions as defined in the args.
The stage being formatted.
Value to format.
Formatted value.
ProtectedkeyExperimentalFormats an object property name into a string for display.
ProtectedgetExperimentalBuilds an array of the property names. Used by VariableInspector.indexProperties
ProtectedindexExperimentalBuilds an array of the properties for the current VariableInspector._rawValue| this._rawValue().
Protected_newExperimentalReturns 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().
An example, constructed instance for a sample object.
StaticstringifyExperimentalAlias for new VariableInspector( ...).toString().
Protected StaticvalidateProtected_valueExperimentalCreates a readable representation of VariableInspector._rawValue as if its type is object (including arrays).
Private Static_testInternalUsed for testing.
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
Example