houser-js-utils
Version:
A comprehensive collection of TypeScript utility functions for common development tasks including array manipulation, string processing, date handling, random number generation, validation, and much more.
105 lines (77 loc) ⢠2.44 kB
Markdown
# houser-js-utils
A comprehensive collection of TypeScript utility functions for common development tasks.
[](https://badge.fury.io/js/houser-js-utils)
[](https://opensource.org/licenses/MIT)
[](http://www.typescriptlang.org/)
## Installation
```bash
npm install houser-js-utils
# or
yarn add houser-js-utils
```
## Features
- Tree-shakeable - Only import what you need
- ESM and CommonJS support
- Full TypeScript support
- Comprehensive test coverage
- Well-documented API
## Available Utilities
- `ArrayUtils` - Array manipulation and helper functions
- `DateUtils` - Date and time manipulation utilities
- `DOMUtils` - DOM manipulation helpers
- `FileUtils` - File handling utilities
- `FormatUtils` - Data formatting utilities
- `MathUtils` - Mathematical operations and calculations
- `RandomUtils` - Random number generation and seeded PRNGs ([detailed docs](RandomUtils_README.md))
- `StringUtils` - String manipulation utilities
- `ValidationUtils` - Data validation helpers
- And many more...
## Usage
```typescript
import { ArrayUtils, DateUtils, RandomUtils } from "houser-js-utils";
// Use the utilities
const uniqueArray = ArrayUtils.deduplicate([1, 2, 2, 3]);
const formattedDate = DateUtils.format(new Date(), "YYYY-MM-DD");
const randomNumber = RandomUtils.int(1, 100);
// Use seeded random for reproducible results
const seeded = RandomUtils.Seeded.fromFixed(42);
const reproducibleValue = seeded.random();
```
## Development
```bash
# Install dependencies
npm install
# or
yarn install
# Run tests
npm test
# or
yarn test
# Build the library
npm run build
# or
yarn build
# Type checking
npm run typecheck
# or
yarn typecheck
# Run tests with coverage
npm run test:coverage
# or
yarn test:coverage
# Watch mode for tests
npm run test:watch
# or
yarn test:watch
```
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
MIT
## API Documentation
š **Full API documentation is available at [https://andrewhouser.github.io/js-utils/](https://andrewhouser.github.io/js-utils/)**
The documentation includes:
- Interactive search functionality
- Detailed function signatures and examples
- Type information and interfaces
- Navigation between modules