@cargo-ai/utils
v1.0.9
Published
Shared TypeScript utilities for Cargo.
Readme
@cargo-ai/utils
Shared TypeScript utilities for Cargo.
A collection of helpers used across Cargo packages and applications: arrays, dates, strings, numbers, JSON, validation, cron, storage helpers, and more.
Documentation: docs.getcargo.ai
Installation
npm install @cargo-ai/utilsUsage
The package exports a single entry point. Import what you need:
import {
formatDate,
parseDate,
formatBytes,
debounce,
pluralize,
parseCronExpression,
// ... and more
} from "@cargo-ai/utils";Areas covered
- Array – array helpers
- Date – date/time formatting, parsing, timezone handling
- String – string formatting and parsing
- Number – number formatting and rounding
- JSON – JSON parsing and schema helpers
- Validation – validation utilities
- Zod – Zod-related helpers
- Cron – cron expression parsing
- Storage – key/value and storage helpers
- Expression – expression-related utilities
- Other – base64, bytes, colors, delay, poll, random, schema, etc.
Check the built TypeScript definitions (build/src/) or your IDE for the full list of exports.
Requirements
- Node.js 22.x
- TypeScript (for types)
License
See the root of the repository for license information.
