mojio-js-sdk
Version:
Mojio javascript REST client.
70 lines (60 loc) • 1.78 kB
JavaScript
// Generated by CoffeeScript 1.10.0
(function() {
var Module, moduleKeywords,
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
moduleKeywords = ['extended', 'included'];
module.exports = Module = (function() {
function Module() {}
Module.extend = function(obj) {
var key, ref, ref1, value;
if (typeof obj === "object") {
for (key in obj) {
value = obj[key];
if (indexOf.call(moduleKeywords, key) < 0) {
this[key] = value;
}
}
} else if (typeof obj === "function") {
ref = obj.prototype;
for (key in ref) {
value = ref[key];
if (indexOf.call(moduleKeywords, key) < 0) {
this[key] = value;
}
}
}
if ((ref1 = obj.extended) != null) {
ref1.apply(this);
}
return this;
};
Module.include = function(obj) {
var key, ref, ref1, value;
if (typeof obj === "object") {
for (key in obj) {
value = obj[key];
if (indexOf.call(moduleKeywords, key) < 0) {
this.prototype[key] = value;
}
}
} else if (typeof obj === "function") {
ref = obj.prototype;
for (key in ref) {
value = ref[key];
if (indexOf.call(moduleKeywords, key) < 0) {
this.prototype[key] = value;
}
}
}
if ((ref1 = obj.included) != null) {
ref1.apply(this);
}
return this;
};
Module.prototype.include = function(obj) {
return Module.include(obj);
};
return Module;
})();
}).call(this);
//# sourceMappingURL=Module.js.map