protox
v1.0.1
Published
Usable extensions to native prototypes in JavaScript using `Object.defineProperties`
Downloads
2
Readme
protox
Usable extensions to native prototypes in JavaScript
using Object.defineProperties
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() {
}
}
});