@zedtech/zedkit-core 0.1.0 → 0.1.2

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 +15 -1
  2. package/package.json +18 -2
package/README.md CHANGED
@@ -1,12 +1,20 @@
1
1
  # @zedtech/zedkit-core
2
2
 
3
- Foundational helpers with a stable public surface. Original work by the
3
+ [![npm version](https://img.shields.io/npm/v/@zedtech/zedkit-core.svg)](https://www.npmjs.com/package/@zedtech/zedkit-core)
4
+ [![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/zedtech-fr/zedkit/blob/main/LICENSE)
5
+
6
+ Typed Result helpers, safe try/catch wrappers, prefixed IDs and hashing —
7
+ stop writing the same utilities in every repo. Original work by the
4
8
  same author.
5
9
 
10
+ ## Install
11
+
6
12
  ```sh
7
13
  pnpm add @zedtech/zedkit-core
8
14
  ```
9
15
 
16
+ ## Usage
17
+
10
18
  ```ts
11
19
  import { tryCatch } from "@zedtech/zedkit-core";
12
20
 
@@ -14,6 +22,12 @@ const parsed = tryCatch(() => JSON.parse(input));
14
22
  if (!parsed.ok) return fallback(parsed.error);
15
23
  ```
16
24
 
25
+ ## When to use
26
+
27
+ Reach for this package when you handle errors, generate IDs, or hash
28
+ values in TypeScript. For server hardening (rate limiting, log
29
+ redaction) see `@zedtech/zedkit-server` instead.
30
+
17
31
  ## API
18
32
 
19
33
  - `Result<T, E = Error>` — `{ ok: true, value: T } | { ok: false, error: E }`
package/package.json CHANGED
@@ -1,11 +1,27 @@
1
1
  {
2
2
  "name": "@zedtech/zedkit-core",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"
7
7
  },
8
- "description": "Foundational helpers: Result, tryCatch, prefixed IDs. Original work by the same author.",
8
+ "description": "Typed Result helpers, safe try/catch wrappers, prefixed IDs and hashing — stop writing the same utilities in every repo. Original work by the same author.",
9
+ "keywords": [
10
+ "typescript",
11
+ "utilities",
12
+ "result-type",
13
+ "error-handling",
14
+ "typed-errors",
15
+ "ulid",
16
+ "unique-id",
17
+ "prefixed-id",
18
+ "hashing",
19
+ "functional"
20
+ ],
21
+ "homepage": "https://github.com/zedtech-fr/zedkit/tree/main/packages/core",
22
+ "bugs": {
23
+ "url": "https://github.com/zedtech-fr/zedkit/issues"
24
+ },
9
25
  "license": "MIT",
10
26
  "repository": {
11
27
  "type": "git",