UNPKG

conductor

Version:

A modern & functional JavaScript utility library

31 lines (22 loc) 488 B
--- description: Get the input's type --- # type ```erlang type :: Any input => String type ``` ## description Returns the `input`'s type as a **lowercase** string. ## example ```javascript import { type } from 'conductor' type('hello') // 'string' type(2) // 'number' type(() => {}) // 'function' type([3, 1, 4]) // 'array' type({hello: 'world'}) // 'object' type(new Date()) // 'date' type(Promise.resolve(42)) // 'promise' type(new Set()) // 'set' type(new Map()) // 'map' ```