@tokens-studio/graph-engine
Version:
An execution engine to handle Token Studios generators and resolvers
21 lines • 703 B
JavaScript
import { Node } from '../../programmatic/node.js';
import { NumberSchema } from '../../schemas/index.js';
export default class NodeDefinition extends Node {
static title = 'Ceil';
static type = 'studio.tokens.math.ceil';
static description = 'Ceil node allows you to adjusts a floating-point number to the nearest higher integer.';
constructor(props) {
super(props);
this.addInput('value', {
type: NumberSchema
});
this.addOutput('value', {
type: NumberSchema
});
}
execute() {
const { value } = this.getAllInputs();
this.outputs.value.set(Math.ceil(value));
}
}
//# sourceMappingURL=ceil.js.map