1.1.0 • Published 2 years ago

type-detail v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Type

A function check real typeof value in JavaScript.
workflow status MIT License contributions welcome

https://nodei.co/npm/type-detail.png?downloads=true&downloadRank=true&stars=true

Installation

npm i type-detail
# or
yarn add type-detail

Usage

import typeDetail from 'type-detail';
// or import { typeDetail } from 'type-detail';

typeDetail(1); // 'integer'
typeDetail(1.1); // 'float'
typeDetail([1, 2, 3]); // 'array'
typeDetail(class Cat {}); // 'class'
typeDetail(async function () {}); // 'promise'
typeDetail(function* () {}); // 'generator'

Support

  • integer
  • float
  • infinity
  • NaN
  • string
  • boolean
  • array
  • object
  • null
  • undefined
  • function
  • symbol
  • map
  • set
  • weakMap
  • weakSet
  • date
  • regExp
  • error
  • promise
  • arrayBuffer
  • dataView
  • int8Array
  • uint8Array
  • uint8ClampedArray
  • int16Array
  • uint16Array
  • int32Array
  • uint32Array
  • float32Array
  • float64Array
  • BigInt64Array
  • BigUint64Array
  • generator
1.1.0

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago