@cargo-ai/utils 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +52 -0
  2. package/package.json +7 -1
package/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # @cargo-ai/utils
2
+
3
+ Shared TypeScript utilities for Cargo.
4
+
5
+ A collection of helpers used across Cargo packages and applications: arrays, dates, strings, numbers, JSON, validation, cron, storage helpers, and more.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @cargo-ai/utils
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ The package exports a single entry point. Import what you need:
16
+
17
+ ```ts
18
+ import {
19
+ formatDate,
20
+ parseDate,
21
+ formatBytes,
22
+ debounce,
23
+ pluralize,
24
+ parseCronExpression,
25
+ // ... and more
26
+ } from "@cargo-ai/utils";
27
+ ```
28
+
29
+ ### Areas covered
30
+
31
+ - **Array** – array helpers
32
+ - **Date** – date/time formatting, parsing, timezone handling
33
+ - **String** – string formatting and parsing
34
+ - **Number** – number formatting and rounding
35
+ - **JSON** – JSON parsing and schema helpers
36
+ - **Validation** – validation utilities
37
+ - **Zod** – Zod-related helpers
38
+ - **Cron** – cron expression parsing
39
+ - **Storage** – key/value and storage helpers
40
+ - **Expression** – expression-related utilities
41
+ - **Other** – base64, bytes, colors, delay, poll, random, schema, etc.
42
+
43
+ Check the built TypeScript definitions (`build/src/`) or your IDE for the full list of exports.
44
+
45
+ ## Requirements
46
+
47
+ - Node.js 22.x
48
+ - TypeScript (for types)
49
+
50
+ ## License
51
+
52
+ See the root of the repository for license information.
package/package.json CHANGED
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "name": "@cargo-ai/utils",
3
+ "description": "Shared TypeScript utilities for Cargo.",
3
4
  "private": false,
5
+ "license": "UNLICENSED",
4
6
  "engines": {
5
7
  "node": "22.x"
6
8
  },
@@ -9,6 +11,10 @@
9
11
  },
10
12
  "type": "module",
11
13
  "exports": "./build/src/index.js",
14
+ "files": [
15
+ "build",
16
+ "README.md"
17
+ ],
12
18
  "scripts": {
13
19
  "afterinstall": "npm run build",
14
20
  "dev": "tsc --watch",
@@ -46,5 +52,5 @@
46
52
  "vite": "6.4.1",
47
53
  "vitest": "3.2.4"
48
54
  },
49
- "version": "1.0.4"
55
+ "version": "1.0.5"
50
56
  }