@qntm-code/utils
Version:
A collection of useful utility functions with associated TypeScript types. All functions have been unit tested.
44 lines (43 loc) • 1.2 kB
TypeScript
export declare enum ValueType {
undefined = "undefined",
null = "null",
boolean = "boolean",
string = "string",
number = "number",
symbol = "symbol",
function = "function",
array = "array",
buffer = "buffer",
arguments = "arguments",
date = "date",
error = "error",
regexp = "regexp",
promise = "promise",
weakmap = "weakmap",
weakset = "weakset",
map = "map",
set = "set",
int8array = "int8array",
uint8array = "uint8array",
uint8clampedarray = "uint8clampedarray",
int16array = "int16array",
uint16array = "uint16array",
int32array = "int32array",
uint32array = "uint32array",
float32array = "float32array",
float64array = "float64array",
bigint64array = "bigint64array",
biguint64array = "biguint64array",
generator = "generator",
object = "object",
mapiterator = "mapiterator",
setiterator = "setiterator",
stringiterator = "stringiterator",
arrayiterator = "arrayiterator",
generatorfunction = "generatorfunction",
moment = "moment"
}
/**
* Determines the type of the given value
*/
export declare function typeOf(value: any): ValueType | string;