Skip to content

czewail/node-is-class

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published