node-is-class
v1.0.4
Published
Check if function is an ES6 class
Downloads
22
Maintainers
Readme
node-is-class
Check if function is an ES6 class
Does not use toString, use Reflect.ownKeys to check it
Function.prototype.toString does not work with Proxy well
Install
$ npm install --save node-is-class
Usage
const isClass = require('node-is-class')
console.log(isClass(class {}))
console.log(isClass(function() {}))
Test
$ npm test
License
MIT