has static method
Checks if a cleaner function is registered with the given name.
This method can be used to verify that a cleaner exists before attempting to resolve it.
Parameters:
name
: Name of the cleaner function to check
Returns:
- True if a cleaner is registered with the given name, false otherwise
Example:
if (CleanerRegistry.has('trimText')) {
// Safe to resolve the cleaner
final cleaner = CleanerRegistry.resolve('trimText');
}
Implementation
static bool has(String name) {
return _cleaners.containsKey(name);
}