Home

protox

Usable extensions to native prototypes in JavaScript using Object.defineProperties

DOCS

distibution file

map file

Usage

in the browser

You might wanna rename the file so that you can differentiate this lib from others.

Download the bundle.jsfile and reference it as such:

<script src="bundle.js"></script>

Node

npm install --save protox

then

require('protox');

Compatibility

Uknown, but modern browsers should be fine.

Development

This is how the methods are defined. They won't be enumerated by for (var k in thing).

Object.defineProperties(Thing.prototype, {
  frob: {
    value: function thingFrob() {
    }
  }
});