@azodik/utils
v0.0.2
Published
A collection of utility functions for the Azodik platform, providing helpful tools for common development tasks including random generation, string manipulation, date handling, pagination, web hashing, and tag management.
Downloads
8
Readme
@azodik/utils
A collection of utility functions for the Azodik platform, providing helpful tools for common development tasks including random generation, string manipulation, date handling, pagination, web hashing, and tag management.
Installation
npm install @azodik/utils
# or
pnpm add @azodik/utils
# or
yarn add @azodik/utilsFeatures
Random Utilities
- Generate random strings, numbers, and OTPs
- Select random values from arrays with optional weighting
String Utilities
- Case conversion (uppercase, lowercase, title case)
- String capitalization helpers
Date Utilities
- Date range calculations using Luxon
- Month start/end date helpers
Web Utilities
- Web hash generation and management
Tag Management
- Tag-related utility functions
Pagination
- Pagination helper functions
Usage
import {
generateRandomString,
capitalizeFirstLetter,
getDateRange,
generateRandomOTP
} from '@azodik/utils';
// Generate random values
const randomString = generateRandomString(10);
const otp = generateRandomOTP(6);
// String manipulation
const capitalized = capitalizeFirstLetter('hello world');
// Date handling
const monthRange = getDateRange({ start_date: undefined, end_date: undefined });Development
This package uses changesets for versioning and publishing.
Available Scripts
pnpm build- Build the packagepnpm dev- Build in watch modepnpm clean- Clean the dist folderpnpm changeset- Create a new changesetpnpm version- Version packages based on changesetspnpm publish:changeset- Publish packages to npm
Workflow
- Make changes to your code
- Create a changeset:
pnpm changeset- Select the type of change (patch, minor, major)
- Write a description of the changes
- Build the package:
pnpm build - Version and publish:
pnpm version- This will update versions and create git tagspnpm publish:changeset- This will publish to npm
License
MIT
