Skip to content

Instantly share code, notes, and snippets.

Avatar

Vivek Dhayalan vivek-dhayalan

View GitHub Profile
View CodeInConfig
| Expression | Meaning |
|----------------------------------------------------------------------------------------|---------------------------------------------------------------------------|
| ["answer", "Q1"] | Gets and returns the answer for the question Q1 |
| ["equals?", "Q1A1", ["answer", "Q1"] | Check if the answer for the question Q1 os "Q1A1". Returns true or false. |
| ["and", ["equals?", "Q1A1", ["answer", "Q1"]] , ["equals?", "Q2A1", ["answer", "Q2"]]] | Check if the answer for the question Q1 os "Q1A1". Returns true or false |
View Nested_List.json
{
"qId": "Q3",
"canDisplay": ["and", ["equals?", "Q1A1", ["answer", "Q1"]] , ["equals?", "Q2A1", ["answer", "Q2"]]],
"options": {
"id": "Q3A1"
}
}
View EvaluatorImplementation
import nisp from 'nisp'
var sandbox = {
'answer': (quid) => answers[quid],
'and': (e1, e2) => e1 && e2,
'equals?': (v1, v2) => v1 == v2
};
var exp = ["and", ["equals?", "Q1A1", ["answer", "Q1"]] , ["equals?", "Q2A1", ["answer", "Q2"] ]];
nisp(exp, sandbox);
@vivek-dhayalan
vivek-dhayalan / SimpleSurvey.json
Last active Mar 20, 2022
A simple survey as json.
View SimpleSurvey.json
{
"questions": [
{
"qId": "Q1",
"options": [
{
"id": "Q1A1",
"displayOnSelect": "Q2"
},
{
View folder_size.txt
local 631 MB
application 704 MB (contains node modules)
lib 481 MB
share 241 MB
.
.
.
View image_impact.csv
REPOSITORY TAG IMAGE ID CREATED SIZE
app-static/ts 1 248f0e845f53 3 week ago 2.47GB
node 11 4051f768340f 3 week ago 904MB