overrider

JavasScript shallow object copier that supports getters/setters

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
overrider
000.3.08 years ago8 years agoMinified + gzip package size for overrider in KB

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.