Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 888 Bytes

README.md

File metadata and controls

34 lines (24 loc) · 888 Bytes

npm npm npm GitHub license

node-is-class

Check if function is an ES6 class (loose module)

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