31 lines
659 B
YAML
31 lines
659 B
YAML
code: basics.calculator
|
|
name: Simple calculator
|
|
description: Do simple operations for numbers in `args` input.
|
|
class: S8n.Components.Basics.Calculator
|
|
methods:
|
|
- Execute
|
|
gui: ComponentCalculator.vue
|
|
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
|
|
tags:
|
|
- arithmetic
|
|
- math
|
|
- basics
|
|
source: S8n.Components.Packages (project)
|
|
category: basics |