UNPKG

@tokens-studio/graph-engine

Version:

An execution engine to handle Token Studios generators and resolvers

20 lines 645 B
import { Node } from '../../programmatic/node.js'; import { NumberSchema } from '../../schemas/index.js'; export default class NodeDefinition extends Node { static title = 'Random'; static type = 'studio.tokens.math.random'; static description = 'Random node allows you to generate a random number between 0 and 1.'; constructor(props) { super(props); this.addOutput('value', { type: { ...NumberSchema, default: Math.random() } }); } execute() { //Noop, random is generated on node creation } } //# sourceMappingURL=random.js.map