lib/models/users.js
function find(param) {
  var fn, asInt = parseInt(param, 10);
  fn = isNaN(asInt) ? findByUsername : findById;
  fn.apply(null, arguments);
}
function find(param) {
  var fn, asInt = parseInt(param, 10);
  fn = isNaN(asInt) ? findByUsername : findById;
  fn.apply(null, arguments);
}
function find ( param ) { var fn , asInt = parseInt ( param , 10 ) ; fn = isNaN ( asInt ) ? findByUsername : findById ; fn . apply ( null , arguments ) ; }
Smart find, uses findByUsername or findBy

@param {*} param
Smart find uses findByUsername or findBy