getallpropertynames

0.1.3 • Public • Published

getAllPropertyNames

Get all property names along the prototype chain

Travis NPM

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', ... ]
 

Package Sidebar

Install

npm i getallpropertynames

Weekly Downloads

2

Version

0.1.3

License

MIT

Last publish

Collaborators

  • malte-wessel