function mixin(object, source, options) {
      var chain = true,
          methodNames = source && functions(source);

      if (!source || (!options && !methodNames.length)) {
        if (options == null) {
          options = source;
        }
        ctor = lodashWrapper;
        source = object;
        object = lodash;
        methodNames = functions(source);
      }
      if (options === false) {
        chain = false;
      } else if (isObject(options) && 'chain' in options) {
        chain = options.chain;
      }
      var ctor = object,
          isFunc = isFunction(ctor);

      forEach(methodNames, function(methodName) {
        var func = object[methodName] = source[methodName];
        if (isFunc) {
          ctor.prototype[methodName] = function() {
            var chainAll = this.__chain__,
                value = this.__wrapped__,
                args = [value];

            push.apply(args, arguments);
            var result = func.apply(object, args);
            if (chain || chainAll) {
              if (value === result && isObject(result)) {
                return this;
              }
              result = new ctor(result);
              result.__chain__ = chainAll;
            }
            return result;
          };
        }
      });
    }
Adds function properties of a source object to the destination object.
If `object` is a function methods will be added to its prototype as well.

@static
@memberOf _
@category Utilities
@param {Function|Object} [object=lodash] object The destination object.
@param {Object} source The object of functions to add.
@param {Object} [options] The options object.
@param {boolean} [options.chain=true] Specify whether the functions added are chainable.
@example

function capitalize(string) {
  return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();
}

_.mixin({ 'capitalize': capitalize });
_.capitalize('fred');
// => 'Fred'

_('fred').capitalize().value();
// => 'Fred'

_.mixin({ 'capitalize': capitalize }, { 'chain': false });
_('fred').capitalize();
// => 'Fred'