2 var ExcludedClassProperties
, ExcludedPrototypeProperties
, Mixin
, name
;
4 module
.exports
= Mixin
= (function() {
5 Mixin
.includeInto = function(constructor) {
7 this.extend(constructor.prototype);
10 if (ExcludedClassProperties
.indexOf(name
) === -1) {
11 if (!constructor.hasOwnProperty(name
)) {
12 constructor[name
] = value
;
16 return (_ref
= this.included
) != null ? _ref
.call(constructor) : void 0;
19 Mixin
.extend = function(object
) {
20 var name
, _i
, _len
, _ref
, _ref1
;
21 _ref
= Object
.getOwnPropertyNames(this.prototype);
22 for (_i
= 0, _len
= _ref
.length
; _i
< _len
; _i
++) {
24 if (ExcludedPrototypeProperties
.indexOf(name
) === -1) {
25 if (!object
.hasOwnProperty(name
)) {
26 object
[name
] = this.prototype[name
];
30 return (_ref1
= this.prototype.extended
) != null ? _ref1
.call(object
) : void 0;
34 if (typeof this.extended
=== "function") {
43 ExcludedClassProperties
= ['__super__'];
46 ExcludedClassProperties
.push(name
);
49 ExcludedPrototypeProperties
= ['constructor', 'extended'];