Skip to content

unctionjs/type

Repository files navigation

@unction/type

Tests Stability Dependencies

(null | void | {constructor: {name: string}}) => string

Returns the type name of the value provided.

type("a") // "String"
type(1) // "Number"
type({}) // "Object"
type([]) // "Array"
type(true) // "Boolean"
type(null) // "null"
type(undefined) // "undefined"