Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/miguelmota/is-class
Check if function is an ES6 class.
https://github.com/miguelmota/is-class
Last synced: 3 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 (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2019-09-24T23:48:02.000Z (over 5 years ago)
- Last Synced: 2024-10-18T09:36:21.021Z (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).
[![License](http://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/miguelmota/is-class/master/LICENSE)
[![NPM version](https://badge.fury.io/js/is-class.svg)](http://badge.fury.io/js/is-class)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](#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)