0.1.3 • Published 9 years ago

getallpropertynames v0.1.3

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

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