Files
picoGraph/scripts/nodes/library/table/all.js
Max Litruv Boonzaayer e64f3e881e Initial commit
moved from private version control
2025-10-19 21:12:41 +11:00

26 lines
736 B
JavaScript

import { createNodeModule } from "../../nodeTypes.js";
/**
* Produces a table iterator using PICO-8's all helper.
*/
export const tableAllNode = createNodeModule(
{
id: "table_all",
title: "All Iterator",
category: "Tables",
description: "Create an iterator covering all indexed table values.",
searchTags: ["all", "table", "iterator", "loop"],
inputs: [{ id: "table", name: "Table", direction: "input", kind: "table" }],
outputs: [
{ id: "iterator", name: "Iterator", direction: "output", kind: "any" },
],
properties: [],
},
{
evaluateValue: ({ resolveValueInput }) => {
const tableValue = resolveValueInput("table", "{}");
return `all(${tableValue})`;
},
}
);