How amitind/util works
Component Relationships
**[Source Files (*.ts)] → [TypeScript Compiler] → [Distribution Bundles]**
• ↙ ↘
• [NPM] [JSR]
• ↘ ↙
• [Consumer Applications]
Detailed Component Breakdown
• Source Components (Blue rectangles):
• src/main.ts (Entry point)
• src/dom.ts (DOM utilities)
• src/index.ts (Exports)
• Build Configuration (Gray hexagons):
• tsconfig.json
• vite.config.ts
• package.json
• jsr.json
• Distribution Channels (Green rectangles):
• NPM Package
• JSR Package
Implementation Details
Specific elements:
a) Utility Functions Groups (use nested containers):
• Random Generators:
• randomString()
• randomNumber()
• binary()
• Array Utilities:
• shuffleArray<T>()
• randomArrayItem<T>()
• randomItemsArray<T>()
• uniqueArrayItems<T>()
• DOM Utilities:
• querySelector<T>()
• querySelectorAll<T>()
• toggleClass()
Notes
• Keep the main utility groups visually distinct but show their relationship to the core library
• Dual distribution nature (NPM/JSR) as a key architectural feature
• Type definition generation and distribution
• Build process flow from source to distribution