Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/ruanyl/simple-type

enhance javascript typeof
https://github.com/ruanyl/simple-type

Last synced: about 1 month ago
JSON representation

enhance javascript typeof

Awesome Lists containing this project

README

        

simple-type
========
[![build status](https://secure.travis-ci.org/ruanyl/simple-type.svg)](http://travis-ci.org/ruanyl/simple-type)
[![NPM version](https://badge.fury.io/js/simple-type.svg)](http://badge.fury.io/js/simple-type)

enhance javascript typeof

support:array, object, number, null, boolean, function, regexp, date, undefined

## Installation

This module is installed via npm:

``` bash
$ npm install simple-type
```

## Example Usage

``` js
var simpleType = require('simple-type');

simpleType({name: 'ruan', age: 12}) === 'object' //true
simpleType(/$a/g) === 'regexp' //true
```