conductor
Why I'm building conductorGitHub
v1.5.0
v1.5.0
  • Introduction
  • Overview
    • Introduction
    • Core concepts
  • API reference
    • always
    • append
    • apply
    • arity
    • branch
    • capitalize
    • compose
    • concat
    • curry
    • curryN
    • delay
    • dump
    • entries
    • equals
    • equalsBy
    • factory
    • filter
    • findIndex
    • flatten
    • flip
    • forEach
    • get
    • head
    • ifElse
    • identity
    • into
    • isPromise
    • iterate
    • join
    • keys
    • map
    • merge
    • mergeBy
    • next
    • not
    • pluck
    • prepend
    • random
    • reduce
    • replace
    • slice
    • some
    • split
    • take
    • then
    • toLowerCase
    • transduce
    • transformers
      • transformers/filter
      • transformers/map
    • type
    • upsert
    • values
  • Guides
    • example use cases
    • checkGuards
Powered by GitBook
On this page
  • description
  • example
  1. API reference

type

type :: Any input => String type

description

Returns the input's type as a lowercase string.

example

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'
Previoustransformers/mapNextupsert

Last updated 7 years ago