UNPKG

jackson

Version:

Jackson, the web application framework

71 lines (61 loc) 2.11 kB
// Generated by CoffeeScript 1.9.3 (function() { var _extend, hasProp = {}.hasOwnProperty, slice = [].slice, extend = 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 i, key, len, o, val; 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.addClassHelpers = function(klass) { klass.extend = function() { var cls, extensions, i, len, objOrFn; extensions = 1 <= arguments.length ? slice.call(arguments, 0) : []; cls = (function(superClass) { extend(_Class, superClass); 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);