lib/index.js
function FriendsOfFriends(mongoose, options) {

    debug('mongoose', mongoose);
    debug('options', options);

    if (!(this instanceof FriendsOfFriends)) {
      return new FriendsOfFriends(mongoose, options);
    } 

    var friendship = require('./friendship'),
        plugin = require('./plugin');

    var defaults = { 
        personModelName:            'Person',
        friendshipModelName:        'Friendship', 
        friendshipCollectionName:   undefined,
    };

    /**
     * The options defined for the module instance
     * @member      {Object} options
     * @memberOf    FriendsOfFriends
     * @property    {String} personModelName            - The modelName of the Person Schema. Default: `'Person'`
     * @property    {String} friendshipModelName        - The name to call the model to be compiled from the Friendship Schema. Default: `'Friendship'`
     * @property    {String|undefined} friendshipCollectionName   - The name to use for the Friendship Collection. Default: `undefined`.
     */
    this.options = utils.extend(defaults, options);

    /**
     * The Friendship model 
     * @member      {Model}     friendship
     * @memberOf    FriendsOfFriends
     * @see         {@link FriendshipModel}
     * @see         [moongoose models]{@link http://mongoosejs.com/docs/models.html}
     */
    this.Friendship = friendship(mongoose, this.options);

    /**
     * Adds friends-of-friends functionality to an existing Schema
     * @function    FriendsOfFriends.plugin
     * @param       {Schema} schema     - The mongoose Schema that gets plugged
     * @param       {Object} options    - Options passed to the plugin
     * @see         {@link AccountModel}
     */
    this.plugin = plugin(mongoose);

}
function FriendsOfFriends(mongoose, options) {

    debug('mongoose', mongoose);
    debug('options', options);

    if (!(this instanceof FriendsOfFriends)) {
      return new FriendsOfFriends(mongoose, options);
    } 

    var friendship = require('./friendship'),
        plugin = require('./plugin');

    var defaults = { 
        personModelName:            'Person',
        friendshipModelName:        'Friendship', 
        friendshipCollectionName:   undefined,
    };

    /**
     * The options defined for the module instance
     * @member      {Object} options
     * @memberOf    FriendsOfFriends
     * @property    {String} personModelName            - The modelName of the Person Schema. Default: `'Person'`
     * @property    {String} friendshipModelName        - The name to call the model to be compiled from the Friendship Schema. Default: `'Friendship'`
     * @property    {String|undefined} friendshipCollectionName   - The name to use for the Friendship Collection. Default: `undefined`.
     */
    this.options = utils.extend(defaults, options);

    /**
     * The Friendship model 
     * @member      {Model}     friendship
     * @memberOf    FriendsOfFriends
     * @see         {@link FriendshipModel}
     * @see         [moongoose models]{@link http://mongoosejs.com/docs/models.html}
     */
    this.Friendship = friendship(mongoose, this.options);

    /**
     * Adds friends-of-friends functionality to an existing Schema
     * @function    FriendsOfFriends.plugin
     * @param       {Schema} schema     - The mongoose Schema that gets plugged
     * @param       {Object} options    - Options passed to the plugin
     * @see         {@link AccountModel}
     */
    this.plugin = plugin(mongoose);

}
Create a new FriendsOfFriends Object with or without new
```javascript
// mongoose is required
var mongoose = require('mongoose');

var FriendsOfFriends = require('friends-of-friends');
var fof = new FriendsOfFriends(mongoose);
// works with or without 'new'
var FriendsOfFriends = require('friends-of-friends')(mongoose);
```

Specifying Configuration Options
```javascript
var options = {
personModelName:             'Player',
friendshipModelName:         'Friend_Relationships',
friendshipCollectionName:    'foo_bar_userRelationships',
};

var FriendsOfFriends = require('friends-of-friends');
var fof = new FriendsOfFriends(mongoose, options);
// again, works with or without 'new'
var FriendsOfFriends = require('friends-of-friends')(mongoose, options);
```
@class FriendsOfFriends
@param {Object} mongoose - required: mongoose instance used in your application
@param {Object} options  - optional object containing configurable options