src/support/lodashMixins.js
function(type, obj) {
     switch (type) {
       case 'greet':
         var name = _.get(obj, 'profile.displayName') || _.get(obj, 'username', '') || obj;

         return _.get(name, 'length') ? name : 'Hey';
         break;
     }

     return obj; 
    }
function(type, obj) {
     switch (type) {
       case 'greet':
         var name = _.get(obj, 'profile.displayName') || _.get(obj, 'username', '') || obj;

         return _.get(name, 'length') ? name : 'Hey';
         break;
     }

     return obj; 
    }
function ( type , obj ) { switch ( type ) { case 'greet' : var name = _ . get ( obj , 'profile.displayName' ) || _ . get ( obj , 'username' , '' ) || obj ; return _ . get ( name , 'length' ) ? name : 'Hey' ; break ; } return obj ; }
Format user name for display.

@param  {String} type How to format.
@param  {User|String} obj  The user object or username string.
@return {*}
Format user name for display .