Private functions
511142
function endsWith(longStr, shortStr) {
		var longLen = longStr.length, shortLen = shortStr.length;
		return (longLen >= shortLen) &&
			(longStr.substr(longLen - shortLen) === shortStr);
	}
775005
function(func, context, argCount) {
                if (context === void 0) return func;
                switch (argCount == null ? 3 : argCount) {
                  case 1: return function(value) {
                    return func.call(context, value);
                  };
                  case 2: return function(value, other) {
                    return func.call(context, value, other);
                  };
                  case 3: return function(value, index, collection) {
                    return func.call(context, value, index, collection);
                  };
                  case 4: return function(accumulator, value, index, collection) {
                    return func.call(context, accumulator, value, index, collection);
                  };
                }
                return function() {
                  return func.apply(context, arguments);
                };
              }
930344
function(attr) {
			// Create the sort function
			var sortFn;

			// CASE: Simple ascending sort
			if (attr == null) {
				sortFn = function(a, b) { return a - b; };
			}
			// CASE: Simple descending sort
			else if (attr === true) {
				sortFn = function(a, b) { return b - a; };
			}
			// CASE: Sort by an attribute
			else if (typeof attr === 'string') {
				sortFn = function(a, b) { return a[attr] - b[attr]; };
			}
			// CASE: Sort by a function
			else {
				sortFn = attr;
			}

			this.arr = this.arr.sort(sortFn);

			return this;
		}
1164670
function partial(fn /*, arg1, arg2 etc */) {
  var partialArgs = [].slice.call(arguments, 1);
  if (!partialArgs.length) {
    return fn;
  }
  return function() {
    var args = [].slice.call(arguments);
    var derivedArgs = [];
    for (var i = 0; i < partialArgs.length; i++) {
      var thisPartialArg = partialArgs[i];
      derivedArgs[i] =
        thisPartialArg === undefined ? args.shift() : thisPartialArg;
    }
    return fn.apply(this, derivedArgs.concat(args));
  };
}
746019
function specialCurry(func, collectionFunc) {
        return function() {
          var args = []
          for(key in arguments){args[key] = arguments[key]}

          args.unshift(collectionFunc.apply(this, []))
          return func.apply(null, args)
        }
      }
877017
function (cb) {
        return function() {
            var args = Array.prototype.slice.call(arguments);
            var next = args.pop();

            args.push(function() {
                // if (err) return next(err);
                var iargs = Array.prototype.slice.call(arguments);

                next.apply(this, iargs);
            });
            cb.apply(this, args);
        };
    }
811263
function( func ) {
				var contents = me._.contents,
					stop = false;

				for ( var i in contents ) {
					for ( var j in contents[ i ] ) {
						stop = func.call( this, contents[ i ][ j ] );
						if ( stop )
							return;
					}
				}
			}
1254268
function decryptObject(obj, decryptFunction) {
    if (_.isArray(obj)) {
        for (var i = 0; i < obj.length; i++) {
            if (_.isString(obj[i])) {
                if (isEncrypted(obj[i])) {
                    obj[i] = decryptFunction(obj[i]);
                }
            } else {
                decryptObject(obj[i], decryptFunction);
            }
        }
    } else if (_.isObject(obj)) {
        for (var key in obj) {
            if (_.isString(obj[key])) {
                if (isEncrypted(obj[key])) {
                    obj[key] = decryptFunction(obj[key]);
                }
            } else {
                decryptObject(obj[key], decryptFunction);
            }
        }
    }
}
1291537
function(a) {
            if ( $.isFunction(a) ) {
                a.apply(this, Array.prototype.slice.call(arguments, 1));
            }
        }
429908
function () {
    // Allow using a function or an object
    var events = _.result(this, 'dispatcherEvents');

    if (_.isUndefined(events) || _.isEmpty(events)) {
      // Bug out early if no dispatcherEvents
      return;
    }

    var registrations = {};
    _.each(events, function (funcOrName, actionType) {
      // Quick sanity check for whether there is a problem with the function/name passed
      if (!(_.isFunction(funcOrName) || _.isFunction(this[funcOrName]))) {
        console.warn('dispatcherEvent: "' + funcOrName + '" is not a function');
        return;
      }

      if (_.isFunction(funcOrName)) {
        registrations[actionType] = funcOrName;
      } else {
        registrations[actionType] = this[funcOrName];
      }

    }.bind(this));

    this.dispatcherToken = dispatcher.register(registrations, this);
  }
343049
function (func) {
    var memo = {};
    return function (term, callback) {
      if (memo[term]) {
        callback(memo[term]);
      } else {
        func.call(this, term, function (data) {
          memo[term] = (memo[term] || []).concat(data);
          callback.apply(null, arguments);
        });
      }
    };
  }
15468
function ( obj ) {
		var methods = [
			["fire",      function () { return observer.fire.apply( observer, [this].concat( array.cast( arguments ) ) ); }],
			["listeners", function ( event ) { return observer.list(this, event ); }],
			["on",        function ( event, listener, id, scope, standby ) { return observer.add( this, event, listener, id, scope, standby ); }],
			["once",      function ( event, listener, id, scope, standby ) { return observer.once( this, event, listener, id, scope, standby ); }],
			["un",        function ( event, id ) { return observer.remove( this, event, id ); }]
		];

		array.each( methods, function ( i ) {
			utility.property( obj, i[0], {value: i[1], configurable: true, enumerable: true, writable: true} );
		});

		return obj;
	}
244065
function(obj) {
            var length = obj.length;
            return typeof arr !== "function" &&
            (length === 0 || typeof length === "number" && length > 0 && (length - 1) in obj);
        }
687150
function create (level) {
        return function() {
            var args, outstring;

            args = Array.prototype.slice.call(arguments, 0);

            if (!IE) {
                args.unshift(level);

            } else {
                outstring = level + ' ';
                args.forEach(function(arg){
                    outstring += object.stringify(arg) + ' ';
                });
                args = [outstring];
            }

            log.apply(this, arguments);
        };
    }
1003358
function () {
    each(dom, function (i, n) {
        var vo = n.two
        var key = n.one;
        _updateDom(key, vo)
    });
}
520416
function(arr, func, obj, func2){
					var big = [obj, func2];
					each(arr, function(i, item){
						big.unshift(item, func)
					});
					when.apply(steal, big);
				}
1179650
function(fn) {

                return function() {

                    var args = Array.from(arguments);
                    var n = args.length;
                    var cells = n > 0 && args[0] || [];
                    var opt = n > 1 && args[n - 1] || {};

                    if (!Array.isArray(cells)) {

                        if (opt instanceof joint.dia.Cell) {
                            cells = args;
                        } else if (cells instanceof joint.dia.Cell) {
                            if (args.length > 1) {
                                args.pop();
                            }
                            cells = args;
                        }
                    }

                    if (opt instanceof joint.dia.Cell) {
                        opt = {};
                    }

                    return fn.call(this, cells, opt);
                };
            }