https://github.com/boizz/realtype
Can be used to distinguish between these types: boolean, number, string, function, array, date, regexp, object, error.
https://github.com/boizz/realtype
array javascript typeof
Last synced: 8 months ago
JSON representation
Can be used to distinguish between these types: boolean, number, string, function, array, date, regexp, object, error.
- Host: GitHub
- URL: https://github.com/boizz/realtype
- Owner: boizz
- License: mit
- Created: 2017-05-09T15:58:09.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-13T06:54:26.000Z (over 8 years ago)
- Last Synced: 2025-10-26T01:47:11.659Z (8 months ago)
- Topics: array, javascript, typeof
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# realtype
[](https://travis-ci.org/BoizZ/realtype)
[](https://www.npmjs.org/package/realtype)
[](https://npmjs.org/package/realtype)
[](https://david-dm.org/BoizZ/realtype)
[](https://app.fossa.io/projects/git%2Bgithub.com%2FBoizZ%2Frealtype?ref=badge_shield)
Can be used to distinguish between these types: boolean, number, string, function, array, date, regexp, object, error.
## Usage
```bash
npm i --save realtype
```
```js
var realtype = require('realtype');
realtype(['Heleth']);
// => array
```
## API
```js
realtype(obj: any): 'boolean' | 'number' | 'string' | 'function' | 'array' | 'date' | 'regexp' | 'object' | 'error'
```
Return real type.
## License
MIT
[](https://app.fossa.io/projects/git%2Bgithub.com%2FBoizZ%2Frealtype?ref=badge_large)