ozserver
Version:
API for OZ
30 lines (22 loc) • 832 B
JavaScript
var EventEmitter, File, exports,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
EventEmitter = require('events').EventEmitter;
File = (function(_super) {
__extends(File, _super);
function File(model) {
var _this = this;
this.model = model != null ? model : {};
this.on('userNotFound', function() {
return _this.model.error = 'User Not Found';
});
}
return File;
})(EventEmitter);
exports = module.exports = function(model) {
if (model == null) {
model = {};
}
return new File(model);
};
exports.File = File;