An open API service indexing awesome lists of open source software.

https://github.com/venkatperi/what-class

gets the javascript type of an object
https://github.com/venkatperi/what-class

Last synced: 2 months ago
JSON representation

gets the javascript type of an object

Awesome Lists containing this project

README

        

# what-class
Returns the javascript class of an object

# Installation
Install with npm.

```shell
npm install --save what-class
```

# Examples

```coffeescript
jsClass = require 'what-class'

jsClass 'abc' # String
jsClass 123 # Number
jsClass [] # Array
jsClass {} # Object
jsClass (->) # Function
jsClass true # Boolean
jsClass new Date() # Date
jsClass /abc/ # RegExp

```