class-chain
v1.0.0
Published
Returns an object’s class and its ancestors.
Downloads
9,956
Maintainers
Readme
class-chain
A Node.js module that returns an object’s class and its ancestors.
Installation
npm install class-chain --save
Usage
const getClassChain = require('class-chain')
class A {}
class B extends A {}
let b = new B()
getClassChain(b) // [B, A]
getClassChain.names(b) // ['B', 'A']