lib/models/posts.js
function find(param) {
  var fn
    , asInt = Number(param);

  fn = isNaN(asInt) ? findBySlug : findById;
  fn.apply(null, arguments);
}
function find(param) {
  var fn
    , asInt = Number(param);

  fn = isNaN(asInt) ? findBySlug : findById;
  fn.apply(null, arguments);
}
function find ( param ) { var fn , asInt = Number ( param ) ; fn = isNaN ( asInt ) ? findBySlug : findById ; fn . apply ( null , arguments ) ; }
Smart find, uses findBySlug or findById

@param {*} param
Smart find uses findBySlug or findById