mirror of
https://github.com/litruv/picoGraph.git
synced 2026-07-24 18:56:04 +10:00
Initial commit
moved from private version control
This commit is contained in:
25
scripts/nodes/library/table/all.js
Normal file
25
scripts/nodes/library/table/all.js
Normal file
@@ -0,0 +1,25 @@
|
||||
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})`;
|
||||
},
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user