Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/ruanyl/simple-type
- Owner: ruanyl
- License: mit
- Created: 2014-12-31T22:19:19.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-02-24T22:44:28.000Z (almost 8 years ago)
- Last Synced: 2024-12-05T19:18:09.849Z (about 2 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```