a toolkit
npm install @medishn/toolkit


- Object Inspection - Safely navigate nested structures with inspect()
- Deep Merging - Type-safe object merging with merge()
- Data Transformation - Chainable map(), filter(), reduce() operations
- 40+ Type Guards - Runtime validation with isString, isObject, isPromise, etc.
- Advanced Types - Maybe, Dictionary, Nullable, and other essential helpers
- HTTP Status Codes - Full HttpStatus enum with RFC-compliant values
- Colorful console output š
- Context-aware logging
- Multiple log levels (error, warn, info, debug, verbose)
- Standardized HTTP exceptions
- RFC 7807 Problem Details format
- Custom error creation utilities
---
``bash`
npm install @medishn/toolkitor
yarn add @medishn/toolkit
---
`typescript
import { inspect, Logger, HttpStatus } from '@medishn/toolkit';
// Object Inspection
const userData = inspect(rawData).to('profile').get('email');
// Logging
const logger = new Logger({ context: 'Auth' });
logger.info('User logged in', { userId: 123 });
// Error Handling
throw new NotFoundException({
detail: 'Resource not found',
status: HttpStatus.NOT_FOUND,
});
// Type Safety
if (isDate(someValue)) {
console.log('Timestamp:', someValue.toISOString());
}
``
---
Explore our comprehensive guides:
- Object Inspection & Manipulation
- Logging Best Practices
- Error Handling Guide
- Http Exception Handling Guide
- Merge Object And Arrau Guide
- Type Guard Utilities Guide
- Type Utilities Reference
- Full API Documentation
---
We welcome contributions! Please see our:
- Contribution Guide
- Code of Conduct
---
Found a bug? Have a feature request?
Open an Issue
Get quick help: bitsgenix@gmail.com
ā Love this package? Leave a star on GitHub to show your support!