codeforboston / codeforboston/cliff-effects
More declarative way of choosing when to show a question
- Dominant language
- JavaScript
- Stars
- 30
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
If we're considering a future where more programs are added, the logic of when to show a question could get really tangled. It might be useful if we could gather each question's requirements in one place. Current thought:
```js
// aFile.js
allRequirements = {
q1: function (client) {
let passes = false;
if (client.hasSection8
&& client.household[0].disabled
&& client.household[0].age > 60) {
passes = true;
}
return passes;
},
// more requirements
};
```
Using the object, though, is a bit messy. At least, the ways I've come up with are. If needed, I'll put them in here.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.