Files
wraith-executioner-year-2-c…/js/utils/inputs.js
T
wraith_executioner_year_2andCursor eb7bcaa385 ✨ ForEach / End ForEach と stabilize 共通化・Prettier 導入
- combined のリスト実行ループ(ForEach / End ForEach)を追加
- ForEach 出力 * と End ForEach value は接続後も常に *
- attachStabilizeHooks / pinWildcardSlot / scheduleStabilizeRetries で JS を整理
- Prettier(JS は trailing comma なし)、README 開発セクションを整理

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 03:11:45 +09:00

15 lines
348 B
JavaScript

export function removeUnusedInputsFromEnd(node, minNumber = 1, nameMatch) {
if (node.removed) {
return;
}
for (let i = node.inputs.length - 1; i >= minNumber; i--) {
if (!node.inputs[i]?.link) {
if (!nameMatch || nameMatch.test(node.inputs[i].name)) {
node.removeInput(i);
}
continue;
}
break;
}
}