getallpropertynames
v0.1.3
Published
Get all property names along the prototype chain
Downloads
8
Maintainers
Readme
getAllPropertyNames
Get all property names along the prototype chain
Install
npm install getallpropertynames --save
Usage
import getAllPropertyNames from 'getallpropertynames';
class Foo {
foo() {}
}
class Bar extends Foo {
bar() {}
}
let bar = new Bar();
getAllPropertyNames(bar);
// ['constructor', 'bar', 'foo', 'toString', 'toLocaleString',
// 'valueOf', 'hasOwnProperty', 'isPrototypeOf', ... ]