-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.func.custom.option.json
29 lines (29 loc) · 1.52 KB
/
config.func.custom.option.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
"INTERPOLATE_OPTION_PREFIX": "{{",
"INTERPOLATE_OPTION_SUFFIX": "}}",
"INTERPOLATE_OPTION_SUBKEYPOINTER": "::",
"key": "value",
"ENV_VALUE": "CONFIG_VALUE",
"MATH_KEY": -123.56,
"mathKey": "{{*MATH_KEY}}",
"BOOL_KEY": true,
"boolKey": "{{*BOOL_KEY}}",
"baseKey": "{{key}}",
"subKey": {
"baseKey": "{{key}}",
"mathKey": "{{*mathKey}}",
"mathKeyEven": "{{*= ({{mathKeyInt}}%2)==0 =}}",
"envKey": "subEnv_{{ENV_VALUE}}",
"deepSubKey": {
"envKey": "deepEnv_{{ENV_VALUE}}"
}
},
"envKey": "{{ENV_VALUE}}",
"complex": "I have both {{key}} & {{ENV_VALUE}} & {{subKey::envKey}} & {{= {{subKey::deepSubKey::envKey}} + {{subKey::envKey}} =}} & {{DOES_NOT_EXIST}}",
"expression": "{{= !{{DOES_NOT_EXIST}} && {{boolKey}} ? {{subKey::deepSubKey::envKey}} :{{subKey::envKey}}=}}",
"mathKeyInt": "{{*=Math.round(Math.abs({{mathKey}}))=}}",
"basicMathCheck": "mathKey: {{mathKey}}, subMathKey: {{subKey::mathKey}}, sum:{{= parseFloat({{mathKey}})+5=}}, subtract:{{= {{mathKey}}-5=}}, mult:{{= {{subKey::mathKey}}*5=}}, div:{{= {{mathKey}}/5=}}",
"advancedMathCheck": "mathKey: {{mathKey}}, subMathKey: {{subKey::mathKey}}, mathKeyInt: {{mathKeyInt}}, PI:{{= Math.PI=}}, random:{{= Math.floor(Math.random() * ({{mathKeyInt}}+1))=}}, pow(3):{{= Math.pow({{subKey::mathKey}},3)=}}, log:{{= Math.log({{mathKeyInt}})=}}",
"superExpression": "{{= {{complex}} +'-:-'+{{expression}} +'-:-'+{{basicMathCheck}} +'-:-'+{{advancedMathCheck}}=}}",
"superExpressionValue": "superExpression: {{superExpression}}"
}