lib/mixins/list.js
function (prop, fn) {
      if (typeof prop === 'function') {
        fn = prop;
        prop = undefined;
      }

      if (typeof prop === 'undefined') {
        return this.sortByKeys(fn);
      }
      return this.sortByItems(prop, fn);
    }
function (prop, fn) {
      if (typeof prop === 'function') {
        fn = prop;
        prop = undefined;
      }

      if (typeof prop === 'undefined') {
        return this.sortByKeys(fn);
      }
      return this.sortByItems(prop, fn);
    }
function ( prop , fn ) { if ( typeof prop === 'function' ) { fn = prop ; prop = undefined ; } if ( typeof prop === 'undefined' ) { return this . sortByKeys ( fn ) ; } return this . sortByItems ( prop , fn ) ; }
Sort list items.

@param  {String} `prop` Property to sort by, undefined to sort by keys.
@param  {Function} `fn` Optional getter function to get items by.
@return {Object} Returns current instance to enable chaining
@api public
Sort list items .