UNPKG

@tokens-studio/graph-engine

Version:

An execution engine to handle Token Studios generators and resolvers

24 lines 724 B
import { Node } from '../../programmatic/node.js'; import { NumberSchema } from '../../schemas/index.js'; export default class NodeDefinition extends Node { static title = 'Divide'; static type = 'studio.tokens.math.divide'; static description = 'Divide node allows you to divide two numbers.'; constructor(props) { super(props); this.addInput('a', { type: NumberSchema }); this.addInput('b', { type: NumberSchema }); this.addOutput('value', { type: NumberSchema }); } execute() { const { a, b } = this.getAllInputs(); this.outputs.value.set(a / b); } } //# sourceMappingURL=divide.js.map