@oyinlola141/lattice-serialization 0.1.2 → 0.1.4

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 +26 -7
  2. package/package.json +13 -9
package/README.md CHANGED
@@ -1,19 +1,38 @@
1
- # @latticejs/serialization
1
+ # @oyinlola141/lattice-serialization
2
2
 
3
- Serialization framework for Lattice multiple format support, type preservation, and streaming
3
+ Data translation layer with JSON serializer, type transformers, envelopes, and registry for Lattice applications.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- npm install @latticejs/serialization
8
+ npm install @oyinlola141/lattice-serialization
9
9
  ```
10
10
 
11
- ## Usage
11
+ ## Quick Start
12
12
 
13
13
  ```typescript
14
- import {} from /* add usage here */ "@latticejs/serialization";
14
+ import { createSerializer } from "@oyinlola141/lattice-serialization";
15
+
16
+ const serializer = createSerializer({
17
+ format: "json",
18
+ transformers: [dateTransformer, bigIntTransformer],
19
+ });
20
+
21
+ const json = serializer.stringify({ id: "123", createdAt: new Date() });
22
+ const obj = serializer.parse(json);
15
23
  ```
16
24
 
17
- ## License
25
+ ## Features
26
+
27
+ - JSON serialization with type transformers
28
+ - Envelope pattern for API responses
29
+ - Transformer registry
30
+ - Support for BigInt, Date, Buffer, and custom types
31
+ - Circular reference detection
32
+
33
+ ## Use Cases
18
34
 
19
- MIT
35
+ - API response serialization
36
+ - Event payload serialization
37
+ - Cache serialization
38
+ - Cross-service data transfer
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oyinlola141/lattice-serialization",
3
- "version": "0.1.2",
4
- "description": "Serialization framework for Lattice multiple format support, type preservation, and streaming",
3
+ "version": "0.1.4",
4
+ "description": "Data translation layer with JSON serializer, type transformers, envelopes, and registry for Lattice applications.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -16,10 +16,10 @@
16
16
  "LICENSE"
17
17
  ],
18
18
  "dependencies": {
19
- "@oyinlola141/lattice-constants": "0.1.2",
20
- "@oyinlola141/lattice-errors": "0.1.2",
21
- "@oyinlola141/lattice-types": "0.1.2",
22
- "@oyinlola141/lattice-validation": "0.1.2"
19
+ "@oyinlola141/lattice-constants": "0.1.3",
20
+ "@oyinlola141/lattice-errors": "0.1.3",
21
+ "@oyinlola141/lattice-types": "0.1.3",
22
+ "@oyinlola141/lattice-validation": "0.1.3"
23
23
  },
24
24
  "devDependencies": {
25
25
  "typescript": "^5.7.0",
@@ -30,9 +30,7 @@
30
30
  "lattice",
31
31
  "serialization",
32
32
  "json",
33
- "binary",
34
- "messagepack",
35
- "type-preservation"
33
+ "transformers"
36
34
  ],
37
35
  "publishConfig": {
38
36
  "access": "public"
@@ -40,6 +38,12 @@
40
38
  "engines": {
41
39
  "node": ">=24.0.0"
42
40
  },
41
+ "module": "./dist/index.js",
42
+ "homepage": "https://github.com/oyinlola-tech/lattice#readme",
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "https://github.com/oyinlola-tech/lattice"
46
+ },
43
47
  "scripts": {
44
48
  "build": "tsc",
45
49
  "typecheck": "tsc --noEmit",