https://github.com/miguelmota/is-class
Check if function is an ES6 class.
https://github.com/miguelmota/is-class
Last synced: 4 months ago
JSON representation
Check if function is an ES6 class.
- Host: GitHub
- URL: https://github.com/miguelmota/is-class
- Owner: miguelmota
- License: mit
- Archived: true
- Created: 2015-03-22T04:09:38.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-09-24T23:48:02.000Z (almost 6 years ago)
- Last Synced: 2025-03-17T22:05:17.610Z (4 months ago)
- Language: JavaScript
- Homepage: https://github.com/miguelmota/is-class
- Size: 45.9 KB
- Stars: 43
- Watchers: 2
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nodejs - is-class - Check if function is an ES6 class. (Repository / Check/Detect)
README
# is-class
> Check if function is an ES6 [`class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
[](https://raw.githubusercontent.com/miguelmota/is-class/master/LICENSE)
[](http://badge.fury.io/js/is-class)
[](#contributing)# Install
```bash
npm install is-class
```# Usage
```javascript
const isClass = require('is-class')class F {}
function G() {}console.log(isClass(F)) // true
console.log(isClass(G)) // false
```# Test
```bash
npm test
```# License
[MIT](LICENSE)