nl_tokens: Create a new FriendsOfFriends Object with or without new javascript // mongoose is required var mongoose = require ( mongoose ) ;
pl_tokens: function FriendsOfFriends ( mongoose , options ) { debug ( 'mongoose' , mongoose ) ; debug ( 'options' , options ) ; if ( ! ( this instanceof FriendsOfFriends ) ) { return <mask> 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 ) ; }