Extending ignoredModules to accept a function