lib/handlers.js
function moduleExists(name) {
  //TODO: Check that the file exists before trying to require it.
  try {
    require.resolve(name);
  }
  catch (err) {
    this.server.emit('error', err);
    return false;
  }
  return true;
}
function moduleExists(name) {
  //TODO: Check that the file exists before trying to require it.
  try {
    require.resolve(name);
  }
  catch (err) {
    this.server.emit('error', err);
    return false;
  }
  return true;
}
function moduleExists ( name ) { //TODO: Check that the file exists before trying to require it. try { require . resolve ( name ) ; } catch ( err ) { this . server . emit ( 'error' , err ) ; return false ; } return true ; }
Check to see if the provided name is a valid node module.
@param name
@returns {boolean}
Check to see if the provided name is a valid node module .