Files
Aislo/resources/tester/helper_m02_hopyo_unit.cjs
eomsangdonandClaude Sonnet 5.5 6e24b50c94 feat(784-2): 확인 창 배 칸 → 단위 환산 칸 — 같으면 숨김 · 몫 줄 몫만 · 빈칸 추정만 입력 · 장부 같은 꼴
- 새 logic/M02_MasterTemplete_Hopyo_Unit.ts: unitView(숨김 판정 · 두 단위 · 추정 두께)
- CheckRows: 「단위 같음 ×1」 · 「엑셀 1 ㎡ = 우리 [ ] 본」 · 「두께 0.2m 로 추정」 · Ledger 같은 입력 꼴
- 지킴 시험 test_단위_환산_칸_보이기_784_2 + helper_m02_hopyo_unit.cjs

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 20:07:50 +09:00

14 lines
684 B
JavaScript

/* 784-2 — `logic/M02_MasterTemplete_Hopyo_Unit.ts` 단위 환산 보이기 판정을 트랜스파일해 Node 로 돌림.
* stdin = {cases: [{part, from, to}]} · stdout = unitView 결과 배열 JSON. */
const fs = require("fs");
const path = require("path");
const { makeLoader } = require("./helper_ts_stub_loader.cjs");
const ROOT = path.join(__dirname, "..", "..");
const { loadTs } = makeLoader({ root: ROOT });
const unit = loadTs(
path.join(ROOT, "M02_MasterTemplete", "logic", "M02_MasterTemplete_Hopyo_Unit.ts"),
);
const input = JSON.parse(fs.readFileSync(0, "utf8"));
process.stdout.write(JSON.stringify(input.cases.map((c) => unit.unitView(c.part, c.from, c.to))));