MCPcopy
hub / github.com/CacheControl/json-rules-engine / setName

Method setName

src/rule.js:61–67  ·  view source on GitHub ↗

* Sets the name of the rule * @param {any} name - any truthy input and zero is allowed

(name)

Source from the content-addressed store, hash-verified

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.

Callers 2

constructorMethod · 0.95
rule.test.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected