/rules-engine

Primary LanguageTypeScript

Create a method that accepts an array of rule identifiers

  • It should return a rules engine that accepts a number, runs all rules and return the result.
  • If input in less than or equal to zero, stop processing rules and return value. Otherwise, continue processing.
  • All rules should be indpendantly testable and reusable.

Create the following rules

  • Add five
  • Subtract five
  • Multiply by two