🔍
Smart Detection
Automatically finds props and arguments that are always passed the same value across your entire codebase.
A static analysis CLI for TypeScript projects that detects parameters that always receive the same value.
$ npx dittory ./src --min=3$ pnpm dlx dittory ./src --min=3$ yarn dlx dittory ./src --min=3$ bunx dittory ./src --min=3Button src/components/Button.tsx:15
Constant Arguments:
- variant = "primary"
Usages (5):
- src/pages/Home.tsx:23
- src/pages/About.tsx:45
- src/pages/Contact.tsx:12
- src/features/auth/Login.tsx:67
- src/features/auth/Register.tsx:89
fetchUser src/api/users.ts:42
Constant Arguments:
- includeProfile = true
- cache = false
Usages (3):
- src/hooks/useUser.ts:18
- src/pages/Profile.tsx:31
- src/components/UserCard.tsx:55
---
Found 2 function(s) with constant arguments out of 24 function(s).When a prop or argument is always passed the same value across your codebase, it's often a sign that: