houser-js-utils
v1.1.0
Published
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.
Maintainers
Readme
houser-js-utils
A comprehensive collection of TypeScript utility functions for common development tasks.
Installation
npm install houser-js-utils
# or
yarn add houser-js-utilsFeatures
- 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 functionsDateUtils- Date and time manipulation utilitiesDOMUtils- DOM manipulation helpersFileUtils- File handling utilitiesFormatUtils- Data formatting utilitiesMathUtils- Mathematical operations and calculationsRandomUtils- Random number generation and seeded PRNGs (detailed docs)StringUtils- String manipulation utilitiesValidationUtils- Data validation helpers- And many more...
Usage
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
# 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:watchContributing
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/
The documentation includes:
- Interactive search functionality
- Detailed function signatures and examples
- Type information and interfaces
- Navigation between modules
