overrider
v0.3.0
Published
JavasScript shallow object copier that supports getters/setters
Downloads
270
Readme
overrider
JavasScript shallow object copier that supports getters/setters
Require/include
Node.js / Browserify:
var overrider = require('overrider').Base;
Browsers:
<script src="http://joneit.github.io/overrider/overrider.js"></script>
or:
<script src="http://joneit.github.io/overrider/overrider.min.js"></script>
Usage
var a = { a: 3 };
var b = { b: 5 };
var c = { get abc() { return this.c }, set abc(x) { this.c = x } };
var object = overrider(a, b, c); // result is `a` which now has an `a.b` and the `a.abc` getter and setter
Documentation
Detailed documentation can be found here.
Submodules
See the note Regarding submodules for important information on cloning this repo or re-purposing its build template.