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
-
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 aProposition
const resultFactory = (rule, ruleElement, operator) => { const name = nameFactory(rule, ruleElement, operator) const truthVal = invoke(rule.value new Proposition( }
-
-
remove-middle-man
: Move all of Grunt's features into npm-scripts
Replace custom methods with lodash methods
Propositions
- #and =>
Operators
using lodash
Extend We'll keep many low-level operator, e.g., comparison operator, but also add
includes