new Scrubber()
Represents the Scrubber class.
Properties:
Name | Type | Description |
---|---|---|
processors |
array | The processors injected |
Methods
scrub()
Scrub a target object.
when(condition, trigger)
Set a processor.
Parameters:
Name | Type | Description |
---|---|---|
condition |
function | The condition passing a Condition instance as an argument (should return true/false) |
trigger |
function | The trigger passing a Trigger instance as an argument (should return the scrubbed result) |