* Sets the name of the rule * @param {any} name - any truthy input and zero is allowed
(name)
| 59 | * @param {any} name - any truthy input and zero is allowed |
| 60 | */ |
| 61 | setName (name) { |
| 62 | if (!name && name !== 0) { |
| 63 | throw new Error('Rule "name" must be defined') |
| 64 | } |
| 65 | this.name = name |
| 66 | return this |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * Sets the conditions to run when evaluating the rule. |
no outgoing calls
no test coverage detected