Daily Toolset Utils
A lightweight and versatile collection of TypeScript utility functions designed for everyday development needs. Streamline your Node.js, React, and Next.js projects with a powerful set of well-organized helpers for strings, arrays, dates, objects, and more. Perfect for building efficient, modern applications with ease.
Features
- String Manipulation: Format and process strings with ease.
- Object Transformation: Effortlessly handle nested and flattened objects.
- Chunk Splitting: Split data into manageable chunks for better handling.
- Unique String Generation: Create random, secure strings for passwords or IDs.
- And More!
Installation
Install the package via npm:
npm install @explita/daily-toolset-utils --save
Quick Examples
import {
chunkSplit,
uniqueString,
transformObject,
} from "@explita/daily-toolset-utils";
// Split a number into groups
console.log(chunkSplit(123456789, { groupSize: 3, separator: "," })); // "123,456,789"
// Generate a random password string
console.log(uniqueString({ length: 12, isPassword: true })); // e.g., "A7*b8s@5Kd3!"
// Transform a flattened object to nested
console.log(transformObject({ "a.b.c": "value" })); // { a: { b: { c: "value" } } }
Documentation
For detailed documentation, including a comprehensive list of functions and their use cases, visit the Daily Toolset Documentation.
Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Open a Pull Request.