* Remove a fact definition to the engine. Facts are called by rules as they are evaluated. * @param {object|Fact} id - fact identifier or instance of Fact
(factOrId)
| 178 | * @param {object|Fact} id - fact identifier or instance of Fact |
| 179 | */ |
| 180 | removeFact (factOrId) { |
| 181 | let factId |
| 182 | if (!(factOrId instanceof Fact)) { |
| 183 | factId = factOrId |
| 184 | } else { |
| 185 | factId = factOrId.id |
| 186 | } |
| 187 | |
| 188 | return this.facts.delete(factId) |
| 189 | } |
| 190 | |
| 191 | /** |
| 192 | * Iterates over the engine rules, organizing them by highest -> lowest priority |
no outgoing calls
no test coverage detected