Roadmap (v2.0.0) - gregswindle/jsrules GitHub Wiki

A notepad for refactoring and improving jsrules.

Change the name

Since acronyms like "js" are poo-pood infixes, maybe we should go back to its roots, and try something like:

/* 🌟 */ @archetypes/rules 

Disinfect all code smells

  1. extract:method - There is lots of repetitious source code that could use refactor:extract function, especially:

    • nameFactory - A factory function that eliminates duplicate code by creating a name for unique RuleElements, e.g.,

      const nameFactory = (rule, ruleElement, operator) =>
        `(${rule.name} ${operator.toString()} ${ruleElement.name})`
      
    • resultFactory - returns a Proposition

      const resultFactory = (rule, ruleElement, operator) => {
        const name = nameFactory(rule, ruleElement, operator)
        const truthVal = invoke(rule.value
        new Proposition(
      }
      
  2. remove-middle-man: Move all of Grunt's features into npm-scripts

Replace custom methods with lodash methods

Propositions

  1. #and =>

Extend Operators using lodash

We'll keep many low-level operator, e.g., comparison operator, but also add

  1. includes