A comprehensive collection of TypeScript utility functions for common development tasks.
npm install houser-js-utils
# or
yarn add houser-js-utils
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 helpersimport { 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();
# 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
Contributions are welcome! Please feel free to submit a Pull Request.
MIT
📚 Full API documentation is available at https://andrewhouser.github.io/js-utils/
The documentation includes: