phase-9: domain-driven architecture complete
- Restructured server layer with 5 domains: shared, screener, portfolio, calls, finance - Migrated 58 TypeScript files to domain-driven structure - Updated CLAUDE.md with new architecture documentation - Added .gitignore rules for .md files (except CLAUDE.md) - Removed unused CatalystAnalyst import from app.ts - Fixed lint errors: removed unused imports, fixed regex escape, added console suppressions - Verified no sensitive data in git history - Server code compiles cleanly with TypeScript strict mode
This commit is contained in:
committed by
saikiranvella
parent
83116baa3c
commit
96a752ecf7
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Split an array into smaller chunks of specified size.
|
||||
* @param array The array to split
|
||||
* @param size The size of each chunk
|
||||
* @returns Array of chunks
|
||||
* @example chunkArray([1,2,3,4,5], 2) → [[1,2], [3,4], [5]]
|
||||
*/
|
||||
export const chunkArray = <T>(array: T[], size: number): T[][] => {
|
||||
const chunkCount = Math.ceil(array.length / size);
|
||||
return Array.from({ length: chunkCount }, (_, index) => {
|
||||
const start = index * size;
|
||||
const end = start + size;
|
||||
return array.slice(start, end);
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user