enchancements
This commit is contained in:
34
basics/calculator.json
Normal file
34
basics/calculator.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"code": "basics.calculator",
|
||||
"name": "Simple calculator",
|
||||
"description": "Do simple operations for numbers in `args` input.",
|
||||
"icon": "mdi-calculator",
|
||||
"inputs": [
|
||||
{
|
||||
"name": "operator",
|
||||
"type": "string",
|
||||
"description": "Operation to perform",
|
||||
"enum": ["add", "subtract", "multiply", "divide"],
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "args",
|
||||
"type": "object[]",
|
||||
"description": "Array of numbers to operate on",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "result",
|
||||
"type": "object",
|
||||
"description": "Result of the calculation"
|
||||
}
|
||||
],
|
||||
"source": "S8n.Components.Packages (project)",
|
||||
"class": "S8n.Components.Basics.Calculator",
|
||||
"methods": ["Execute"],
|
||||
"gui": "ComponentCalculator.vue",
|
||||
"category": "basics",
|
||||
"tags": ["arithmetic", "math", "basics"]
|
||||
}
|
||||
Reference in New Issue
Block a user