getallpropertynames

Get all property names along the prototype chain

Usage no npm install needed!

<script type="module">
  import getallpropertynames from 'https://cdn.skypack.dev/getallpropertynames';
</script>

README

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