getBaseType(value: any): string
Return a string depending on the type of the given value.
Possible values:
- undefined
- null
- NaN
- boolean
- number
- string
- array
- object
- function
- generator
- class
Note: generator refers to a generator function.
getDetailedType(value: any): string
Return a string depending on the type of the given value.
Provide more details than GetBaseType
.
Possible values:
- undefined
- null
- NaN
- boolean (true or false)
- number (N)
- string (N characters)
- array (N items)
- anonymous object
- object anonymous class
- object ClassName
- anonymous function
- function name
- anonymous generator
- generator name
- anonymous class
- class Name
Note: generator refers to a generator function.
getName(value: any): string|undefined
If given a function, generator function, method, or class, return its name.
If given an object, return its constructor name.
If the given value doesn't have a name, return an empty string.
For any other value, return undefined.