function isRegisteredModule (name, method) {
  if (typeof method === 'string') {
    return !!(modules[name] && modules[name][method])
  }
  return !!modules[name]
}
Check whether the module or the method has been registered.
@param {String} module name
@param {String} method name (optional)