UNPKG

jackson

Version:

Jackson, the web application framework

71 lines (61 loc) 2.14 kB
// Generated by CoffeeScript 1.7.1 (function() { var _extend, __hasProp = {}.hasOwnProperty, __slice = [].slice, __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; }; _extend = function(obj, rest) { var key, o, val, _i, _len; for (_i = 0, _len = rest.length; _i < _len; _i++) { o = rest[_i]; if (o) { for (key in o) { if (!__hasProp.call(o, key)) continue; val = o[key]; obj[key] = val; } } } return obj; }; exports.extend = function() { var obj, rest; obj = arguments[0], rest = 2 <= arguments.length ? __slice.call(arguments, 1) : []; return _extend(obj, rest); }; exports.clone = function() { var objs; objs = 1 <= arguments.length ? __slice.call(arguments, 0) : []; return _extend({}, objs); }; exports.ClassHelpers = function(klass) { klass.extend = function() { var cls, extensions, objOrFn, _i, _len; extensions = 1 <= arguments.length ? __slice.call(arguments, 0) : []; cls = (function(_super) { __extends(_Class, _super); function _Class() { return _Class.__super__.constructor.apply(this, arguments); } return _Class; })(this); for (_i = 0, _len = extensions.length; _i < _len; _i++) { objOrFn = extensions[_i]; switch (typeof objOrFn) { case "object": _extend(cls.prototype, [objOrFn]); break; case "function": objOrFn.call(cls); } } return cls; }; return klass.prototype.bind = function() { var curry, fn; fn = arguments[0], curry = 2 <= arguments.length ? __slice.call(arguments, 1) : []; return fn.bind.apply(fn, [this].concat(__slice.call(curry))); }; }; exports.jacksonVersion = require(__dirname + '/../package.json').version; }).call(this);