2 views
MoonTechLab/LunaTV
本项目采用 CC BY-NC-SA 协议,禁止任何商业化行为,任何衍生项目必须保留本项目地址并以相同协议开源
TypeScript★ 10,262+505 that day#7 on trending
9.9%duplicated code · 3,238 of 32,698 lines
199clones in code
124code files of 133 scanned
9.54%duplicated over all files · 202 clones
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code.
Largest clones in the code
- 36 lines in 3 placestypescript185 tokenssrc/app/api/favorites/route.ts:61–96src/app/api/playrecords/route.ts:37–68src/app/api/searchhistory/route.ts:43–78
61 console.error('获取收藏失败', err); 62 return NextResponse.json( 63 { error: 'Internal Server Error' }, 64 { status: 500 } 65 ); 66 } 67} 68 69/** 70 * POST /api/favorites37 console.error('获取播放记录失败', err); 38 return NextResponse.json( 39 { error: 'Internal Server Error' }, 40 { status: 500 } 41 ); 42 } 43} 44 45export async function POST(request: NextRequest) { 46 try {First 10 of 36 lines, the second copy on the right.
- 21 lines in 4 placestsx103 tokens
251 className='flex items-center text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200' 252 > 253 查看更多 254 <ChevronRight className='w-4 h-4 ml-1' /> 255 </Link> 256</div> 257<ScrollableRow> 258 {loading 259 ? // 加载状态显示灰色占位数据 260 Array.from({ length: 8 }).map((_, index) => (First 10 of 21 lines.
- 23 lines in 3 placestypescript144 tokenssrc/app/api/favorites/route.ts:19–41src/app/api/favorites/route.ts:73–95src/app/api/favorites/route.ts:144–166
19export async function GET(request: NextRequest) { 20 try { 21 // 从 cookie 获取用户信息 22 const authInfo = getAuthInfoFromCookie(request); 23 if (!authInfo || !authInfo.username) { 24 return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }); 25 } 26 27 const config = await getConfig(); 28 if (authInfo.username !== process.env.USERNAME) {First 10 of 23 lines.
7 more
- 50 lines in 2 placestypescript251 tokens
- 39 lines in 2 placestsx237 tokens
- 25 lines in 3 placestypescript109 tokens
- 51 lines in 2 placestsx210 tokens
- 39 lines in 2 placestsx184 tokens
- 39 lines in 2 placestsx183 tokens
- 39 lines in 2 placestsx174 tokens
Largest clones over all files, tests and data included
- 36 lines in 3 placestypescript185 tokenssrc/app/api/favorites/route.ts:61–96src/app/api/playrecords/route.ts:37–68src/app/api/searchhistory/route.ts:43–78
61 console.error('获取收藏失败', err); 62 return NextResponse.json( 63 { error: 'Internal Server Error' }, 64 { status: 500 } 65 ); 66 } 67} 68 69/** 70 * POST /api/favorites37 console.error('获取播放记录失败', err); 38 return NextResponse.json( 39 { error: 'Internal Server Error' }, 40 { status: 500 } 41 ); 42 } 43} 44 45export async function POST(request: NextRequest) { 46 try {First 10 of 36 lines, the second copy on the right.
- 11 lines in 2 placescssstyles351 tokens
363--tw-color-primary-950: 8 47 73; 364--color-primary-50: rgb(var(--tw-color-primary-50)); /* #f0f9ff */ 365--color-primary-100: rgb(var(--tw-color-primary-100)); /* #e0f2fe */ 366--color-primary-200: rgb(var(--tw-color-primary-200)); /* #bae6fd */ 367--color-primary-300: rgb(var(--tw-color-primary-300)); /* #7dd3fc */ 368--color-primary-400: rgb(var(--tw-color-primary-400)); /* #38bdf8 */ 369--color-primary-500: rgb(var(--tw-color-primary-500)); /* #0ea5e9 */ 370--color-primary-600: rgb(var(--tw-color-primary-600)); /* #0284c7 */ 371--color-primary-700: rgb(var(--tw-color-primary-700)); /* #0369a1 */ 372--color-primary-800: rgb(var(--tw-color-primary-800)); /* #075985 */First 10 of 11 lines.
- 21 lines in 4 placestsx103 tokens
251 className='flex items-center text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200' 252 > 253 查看更多 254 <ChevronRight className='w-4 h-4 ml-1' /> 255 </Link> 256</div> 257<ScrollableRow> 258 {loading 259 ? // 加载状态显示灰色占位数据 260 Array.from({ length: 8 }).map((_, index) => (First 10 of 21 lines.
- 23 lines in 3 placestypescript144 tokens
- 50 lines in 2 placestypescript251 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| tsx | 37 | 19,195 | 104 | 1,722 | 8.97% |
| typescript | 68 | 11,804 | 95 | 1,516 | 12.84% |
| javascript | 8 | 841 | 0 | 0 | 0% |
| bash | 10 | 684 | 0 | 0 | 0% |
| perl | 1 | 174 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| tsx | 37 | 19,195 | 104 | 1,722 | 8.97% |
| typescript | 68 | 11,804 | 95 | 1,516 | 12.84% |
| css | 3 | 844 | 2 | 22 | 2.61% |
| yaml | 3 | 267 | 1 | 15 | 5.62% |
| javascript | 8 | 841 | 0 | 0 | 0% |
| bash | 10 | 684 | 0 | 0 | 0% |
| markdown | 1 | 408 | 0 | 0 | 0% |
| perl | 1 | 174 | 0 | 0 | 0% |
| json | 2 | 126 | 0 | 0 | 0% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Sep 9, 2026 | #7 | 10,262 (+505) | 133 | 34,343 | 202 | 9.54% | 9.9% | — | 388089d |
| Sep 8, 2026 | #3 | 9,877 (+197) | 133 | 34,343 | 202 | 9.54% | 9.9% | — | 388089d |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.