remove function, which uses getters and setters

This commit is contained in:
Fabian Jakobs 2010-12-15 12:36:13 +01:00
commit caec77b63f

View file

@ -586,33 +586,6 @@ exports.clone = function(object, deep) {
return object;
};
/**
* Helper method for extending one object with another
* Copies all properties from source to target. Returns the extended target
* object.
* Taken from John Resig, http://ejohn.org/blog/javascript-getters-and-setters/.
*/
exports.mixin = function(a, b) {
for (var i in b) {
var g = b.__lookupGetter__(i);
var s = b.__lookupSetter__(i);
if (g || s) {
if (g) {
a.__defineGetter__(i, g);
}
if (s) {
a.__defineSetter__(i, s);
}
} else {
a[i] = b[i];
}
}
return a;
};
/**
* Basically taken from Sproutcore.
* Replaces the count items from idx with objects.