I'm Disgusting Dev - interested in CaaS (Codebase as a Service) solution and willing to increase knowledge of Dev Community about different problems and their solutions
//allocate in one place binding of all rules with resultsconstconditionsEnum={nope:ignoringConditions,hire:hiringConditions,maybe:mbConditions,}letresult='';//find first truth in therefor(letfieldinconditionsEnum){if(conditionsEnum[field].some(condition=>!!condition())){result=field;returnresult;}}
How about that (pre-enterprise example :))
values in object are just arrays of functions:
Hope my nickname speaks for itself
🤣🤣