Comfy-Org / Comfy-Org/ComfyUI_frontend

Remove unused `gcd()` export from `mathUtil.ts` — no production consumer

Open
#11,082 3 comments 0 reactions 0 assignees View on GitHub
audit:dead-code code-audit effort:trivial priority:nice-to-have
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

## Recommendation

### 🗑️ SAFE TO REMOVE

`src/utils/mathUtil.ts` exports `gcd()` but it's only imported in `mathUtil.test.ts`. Only `lcm()` has a production consumer (via `nodeDefUtil.ts`).

## How to Fix

1. Verify: `grep -r 'gcd' src/ --include='*.ts' --include='*.vue' | grep -v test | grep -v '.d.ts'`
2. Remove the export (keep as internal if `lcm` depends on it, or inline)

---
**Category:** Dead Code | **Priority:** Nice-to-have | **Effort:** Trivial
Part of #11022
_Filed by repo-audit skill_

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11082-Remove-unused-gcd-export-from-mathUtil-ts-no-production-consumer-33e6d73d365081059313c7c75230e386) by [Unito](https://www.unito.io)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.