@pithos/core 2.2.0 โ 2.2.1
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.
- package/README.md +53 -333
- package/dist/.tsbuildinfo +1 -1
- package/dist/arkhe/function/cast-comparator.d.ts +0 -1
- package/dist/arkhe/function/cast-comparator.d.ts.map +1 -1
- package/dist/arkhe/function/cast-comparator.js.map +1 -1
- package/dist/arkhe/function/cast-mapping.d.ts +0 -1
- package/dist/arkhe/function/cast-mapping.d.ts.map +1 -1
- package/dist/arkhe/function/cast-mapping.js +0 -1
- package/dist/arkhe/function/cast-mapping.js.map +1 -1
- package/dist/arkhe/function/memoize.d.ts +0 -2
- package/dist/arkhe/function/memoize.d.ts.map +1 -1
- package/dist/arkhe/function/memoize.js.map +1 -1
- package/dist/arkhe/function/pipe.d.ts +1 -2
- package/dist/arkhe/function/pipe.d.ts.map +1 -1
- package/dist/arkhe/function/pipe.js +1 -2
- package/dist/arkhe/function/pipe.js.map +1 -1
- package/dist/autocompletion.d.ts +1 -1
- package/dist/bridges/ensure.d.ts +11 -3
- package/dist/bridges/ensure.d.ts.map +1 -1
- package/dist/bridges/ensure.js +0 -24
- package/dist/bridges/ensure.js.map +1 -1
- package/dist/bridges/ensureAsync.d.ts +10 -3
- package/dist/bridges/ensureAsync.d.ts.map +1 -1
- package/dist/bridges/ensureAsync.js +0 -23
- package/dist/bridges/ensureAsync.js.map +1 -1
- package/dist/bridges/ensurePromise.d.ts +10 -3
- package/dist/bridges/ensurePromise.d.ts.map +1 -1
- package/dist/bridges/ensurePromise.js +0 -24
- package/dist/bridges/ensurePromise.js.map +1 -1
- package/dist/kanon/core/parser.d.ts +27 -1
- package/dist/kanon/core/parser.d.ts.map +1 -1
- package/dist/kanon/core/parser.js +0 -25
- package/dist/kanon/core/parser.js.map +1 -1
- package/dist/kanon/helpers/as-zod.shim.d.ts +2 -7
- package/dist/kanon/helpers/as-zod.shim.d.ts.map +1 -1
- package/dist/kanon/helpers/as-zod.shim.js +42 -5
- package/dist/kanon/helpers/as-zod.shim.js.map +1 -1
- package/dist/kanon/validation.d.ts +34 -43
- package/dist/kanon/validation.d.ts.map +1 -1
- package/dist/kanon/validation.js +19 -53
- package/dist/kanon/validation.js.map +1 -1
- package/dist/taphos/array/head.d.ts +2 -2
- package/dist/taphos/array/head.js +2 -2
- package/dist/taphos/array/without.d.ts +1 -1
- package/dist/taphos/array/without.js +1 -1
- package/dist/taphos/util/rangeRight.d.ts +1 -3
- package/dist/taphos/util/rangeRight.d.ts.map +1 -1
- package/dist/taphos/util/rangeRight.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,383 +1,103 @@
|
|
|
1
1
|
[](https://www.npmjs.com/package/@pithos/core)
|
|
2
2
|
[](https://www.typescriptlang.org/)
|
|
3
3
|
[]()
|
|
4
|
+
[]()
|
|
5
|
+
[]()
|
|
6
|
+
[]()
|
|
7
|
+
[]()
|
|
4
8
|
|
|
5
|
-
# ๐บ Pithos
|
|
9
|
+
# [๐บ Pithos - Utilities Ecosystem](https://pithos.dev)
|
|
6
10
|
|
|
7
11
|
**Open the box to unleash the power**
|
|
8
12
|
|
|
9
|
-
All-in-one utilities ecosystem
|
|
10
|
-
|
|
13
|
+
All-in-one utilities ecosystem for modern web development.
|
|
14
|
+
Zero dependencies. 100% TypeScript. Modules designed to work together, more than the sum of their parts.
|
|
11
15
|
|
|
12
16
|
## โจ Key Features
|
|
13
17
|
|
|
14
|
-
- **๐ก๏ธ
|
|
15
|
-
- **๐ Interchangeable APIs** - 100%
|
|
16
|
-
- **โก๏ธ Ultra-Performance** - High-speed execution with perfect tree-shaking
|
|
17
|
-
- **๐ ๏ธ Production-Ready** - Battle-tested utilities with comprehensive error handling
|
|
18
|
+
- **๐ก๏ธ Production-Ready** - 100% test coverage, 100% mutation score, integration demos
|
|
19
|
+
- **๐ Interchangeable APIs** - 100% compatible with Neverthrow and fp-ts
|
|
20
|
+
- **โก๏ธ Ultra-Performance** - High-speed execution with perfect tree-shaking
|
|
18
21
|
- **๐๏ธ Type it once, infer it everywhere** - Full TypeScript inference, no manual generics, no `any` leaks
|
|
19
22
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Something missing? Let's build it togetherโreach out or open a PR!
|
|
23
|
-
|
|
24
|
-
## ๐ค Why this project?
|
|
25
|
-
|
|
26
|
-
**Born from personal frustration:**
|
|
27
|
-
|
|
28
|
-
- ๐ "Where did I put that utility again?"
|
|
29
|
-
- ๐ Rewriting the same logic because it's faster than searching
|
|
30
|
-
- ๐งฉ Best code scattered across projects, never improving
|
|
31
|
-
- ๐ Great utilities stuck in old codebases
|
|
32
|
-
- ๐ช **Missing the compound effect:** Code that becomes more reliable through repeated use
|
|
33
|
-
|
|
34
|
-
**The solution:** Centralize, evolve, and battle-test in one place.
|
|
35
|
-
|
|
36
|
-
**Plus:** A single package that handles all major web development needs (validation, error handling, data parsing, etc.) in one cohesive bundle with zero dependencies, avoiding supply chain security issues.
|
|
37
|
-
|
|
38
|
-
If you've felt the same frustration, Pithos might be exactly what you need.
|
|
39
|
-
|
|
40
|
-
## ๐ The Pithos Story
|
|
41
|
-
|
|
42
|
-
Like Pandora's pithos that contained both problems and solutions, this utilities ecosystem tackles common development pain points while providing the tools you need.
|
|
43
|
-
By the way, Pandora's "box" was actually a large jar : "Pithos" in Greek ๐.
|
|
44
|
-
Each module draws from Greek mythology:
|
|
45
|
-
|
|
46
|
-
- Arkhe (แผฯฯฮฎ - "origin") โ Core utilities, the foundation
|
|
47
|
-
- Kanon (ฮบฮฑฮฝฯฮฝ - "rule/measure") โ Validation schemas
|
|
48
|
-
- Zygos (ฮถฯ
ฮณฯฯ - "balance/yoke") โ Functional programming patterns with Result and Either types
|
|
49
|
-
- Sphalma (ฯฯฮฌฮปฮผฮฑ - "error/fault") โ Error handling and error factories
|
|
50
|
-
- Taphos (ฯฮฌฯฮฟฯ - "tomb") โ Legacy utilities & deprecated functions
|
|
51
|
-
|
|
52
|
-
## ๐ Installation
|
|
23
|
+
## ๐ Quick Start
|
|
53
24
|
|
|
54
25
|
```bash
|
|
55
26
|
pnpm install @pithos/core
|
|
56
27
|
```
|
|
57
28
|
|
|
58
|
-
## ๐ฆ Usage
|
|
59
|
-
|
|
60
|
-
**Import, use, done!** No more time wasted on rewriting utilities or figuring out how to implement them:
|
|
61
|
-
|
|
62
|
-
```typescript
|
|
63
|
-
import { Arrayable, Nullable } from "pithos/arkhe/types/common";
|
|
64
|
-
import { validation } from "pithos/kanon/validation";
|
|
65
|
-
import { ok, err } from "pithos/zygos/result/result";
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
**That's it!** Start building immediately instead of reinventing the wheel.
|
|
69
|
-
|
|
70
|
-
## ๐ก Some usecases
|
|
71
|
-
|
|
72
|
-
### ๐ท๏ธ **Utility Types** - Even the basics matter
|
|
73
|
-
|
|
74
|
-
```typescript
|
|
75
|
-
import { Nullable, Arrayable } from "pithos/arkhe/types/common";
|
|
76
|
-
import { PartialKeys } from "pithos/arkhe/types/utilities";
|
|
77
|
-
|
|
78
|
-
type User = {
|
|
79
|
-
name: string;
|
|
80
|
-
emails: Arrayable<string>; // string | string[] - single or multiple emails
|
|
81
|
-
nickname: Nullable<string>; // null | string - clear intent: can be null
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
// Simplified user for forms (only name required)
|
|
85
|
-
type UserForm = PartialKeys<User, "emails" | "nickname">;
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### ๐ก๏ธ **Result Pattern** - Error handling made simple
|
|
89
|
-
|
|
90
|
-
**Lightweight alternative to Neverthrow 8.2.0 (3x smaller, 100% compatible)**
|
|
91
|
-
|
|
92
29
|
```typescript
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
30
|
+
import { ensure } from "@pithos/core/bridges/ensure";
|
|
31
|
+
import { string, object, optional, coerceDate } from "@pithos/core/kanon";
|
|
32
|
+
|
|
33
|
+
// Kanon validates, Zygos wraps - one function, two modules
|
|
34
|
+
const userSchema = object({
|
|
35
|
+
name: string(),
|
|
36
|
+
email: string(),
|
|
37
|
+
birthdate: optional(coerceDate()),
|
|
38
|
+
});
|
|
100
39
|
|
|
101
|
-
|
|
102
|
-
const safeFetch = ResultAsync.fromThrowable(
|
|
103
|
-
fetch,
|
|
104
|
-
(error) => `Network error: ${error}`
|
|
105
|
-
);
|
|
40
|
+
const result = ensure(userSchema, formData);
|
|
106
41
|
|
|
107
|
-
const result = await safeFetch("/api/users/123");
|
|
108
42
|
if (result.isOk()) {
|
|
109
|
-
|
|
43
|
+
save(result.value); // fully typed, validated, coerced
|
|
110
44
|
} else {
|
|
111
|
-
|
|
45
|
+
showError(result.error); // validation error as string
|
|
112
46
|
}
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### ๐ ๏ธ **Useful Utilities** - Data manipulation made easy
|
|
116
|
-
|
|
117
|
-
```typescript
|
|
118
|
-
import { chunk } from "pithos/arkhe/array/chunk";
|
|
119
|
-
|
|
120
|
-
// Divide array into groups of 3
|
|
121
|
-
const numbers = [1, 2, 3, 4, 5, 6, 7, 8];
|
|
122
|
-
const groups = chunk(numbers, 3);
|
|
123
|
-
console.log(groups); // [[1, 2, 3], [4, 5, 6], [7, 8]]
|
|
124
47
|
|
|
125
|
-
//
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
48
|
+
// Or chain with map/mapErr - it's a full Zygos Result
|
|
49
|
+
ensure(userSchema, formData)
|
|
50
|
+
.map(user => ({ ...user, name: user.name.trim() }))
|
|
51
|
+
.mapErr(error => `Validation failed: ${error}`);
|
|
129
52
|
```
|
|
130
53
|
|
|
131
|
-
|
|
54
|
+
No manual try/catch, no `.safeParse()` + `if (!result.success)` boilerplate. That's the point of having an ecosystem.
|
|
132
55
|
|
|
133
|
-
|
|
56
|
+
## ๐ฆ Modules
|
|
134
57
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
import { validation } from "pithos/kanon/validation";
|
|
143
|
-
|
|
144
|
-
// Validation schema โ familiar Zod-like API
|
|
145
|
-
const ProductSchema = validation.object({
|
|
146
|
-
id: validation.string(),
|
|
147
|
-
name: validation.string(),
|
|
148
|
-
price: validation.string(),
|
|
149
|
-
stock: validation.string(),
|
|
150
|
-
category: validation.string().optional(),
|
|
151
|
-
});
|
|
58
|
+
| Module | Role | Alternative to |
|
|
59
|
+
|---|---|---|
|
|
60
|
+
| **Arkhe** (แผฯฯฮฎ - origin) | Core utilities & data manipulation | Lodash, Underscore, Ramda |
|
|
61
|
+
| **Kanon** (ฮบฮฑฮฝฯฮฝ - rule) | Schema validation | Zod, Yup, Joi |
|
|
62
|
+
| **Zygos** (ฮถฯ
ฮณฯฯ - balance) | Result/Either/Option patterns | Neverthrow, fp-ts |
|
|
63
|
+
| **Sphalma** (ฯฯฮฌฮปฮผฮฑ - error) | Typed error factories | - |
|
|
64
|
+
| **Taphos** (ฯฮฌฯฮฟฯ - tomb) | Deprecated utils with migration paths | "You Don't Need Lodash" |
|
|
152
65
|
|
|
153
|
-
|
|
154
|
-
const safeFetch = ResultAsync.fromThrowable(
|
|
155
|
-
fetch,
|
|
156
|
-
(error) => `Network error: ${error}`
|
|
157
|
-
);
|
|
66
|
+
All modules are **stable** and **production-ready** with 100% test coverage.
|
|
158
67
|
|
|
159
|
-
|
|
160
|
-
.andThen((response) => {
|
|
161
|
-
const safeJson = ResultAsync.fromThrowable(
|
|
162
|
-
() => response.json(),
|
|
163
|
-
(error) => `JSON parse error: ${error}`
|
|
164
|
-
);
|
|
165
|
-
return safeJson();
|
|
166
|
-
})
|
|
167
|
-
.andThen((data) => {
|
|
168
|
-
// Kanon validation
|
|
169
|
-
const validationResult = ProductSchema.safeParse(data);
|
|
68
|
+
> Like Pandora's pithos that contained both problems and solutions, this ecosystem tackles common development pain points while providing the tools you need. By the way, Pandora's "box" was actually a large jar - *pithos* in Greek ๐
|
|
170
69
|
|
|
171
|
-
|
|
172
|
-
return errAsync(`Validation failed: ${validationResult.error.message}`);
|
|
173
|
-
}
|
|
70
|
+
## ๐ณ Tree Shaking
|
|
174
71
|
|
|
175
|
-
|
|
176
|
-
...validationResult.data,
|
|
177
|
-
price: parseFloatDef(validationResult.data.price, 0), // String โ Number
|
|
178
|
-
stock: parseFloatDef(validationResult.data.stock, 0), // String โ Number
|
|
179
|
-
});
|
|
180
|
-
});
|
|
181
|
-
}
|
|
72
|
+
Direct imports for optimal bundle size:
|
|
182
73
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
} else {
|
|
188
|
-
console.error("Error:", result.error);
|
|
189
|
-
}
|
|
74
|
+
```typescript
|
|
75
|
+
// โ
Only what you use
|
|
76
|
+
import { chunk } from "@pithos/core/arkhe/array/chunk";
|
|
77
|
+
import { debounce } from "@pithos/core/arkhe/function/debounce";
|
|
190
78
|
```
|
|
191
79
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
Pithos provides deprecated functions with clear migration paths to native APIs:
|
|
80
|
+
Modules with cohesive APIs (Kanon, Zygos, Sphalma) also expose barrels:
|
|
195
81
|
|
|
196
82
|
```typescript
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
const pairs = [
|
|
200
|
-
["a", 1],
|
|
201
|
-
["b", 2],
|
|
202
|
-
["c", 3],
|
|
203
|
-
];
|
|
204
|
-
|
|
205
|
-
// โ Deprecated approach - still works but marked for removal
|
|
206
|
-
const obj = fromPairs(pairs);
|
|
207
|
-
console.log(obj); // { a: 1, b: 2, c: 3 }
|
|
208
|
-
|
|
209
|
-
// โ
Recommended approach - use native Object.fromEntries()
|
|
210
|
-
const objNative = Object.fromEntries(pairs);
|
|
211
|
-
console.log(objNative); // { a: 1, b: 2, c: 3 }
|
|
83
|
+
// โ
Also fine - negligible overhead with modern bundlers
|
|
84
|
+
import { string, object, optional } from "@pithos/core/kanon";
|
|
212
85
|
```
|
|
213
86
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
- **Zero breaking changes** - deprecated functions still work
|
|
217
|
-
- **Clear migration path** - examples show exactly what to use instead
|
|
218
|
-
- **Future-proof** - migrate at your own pace without pressure
|
|
219
|
-
- **Bundle optimization** - native APIs are often more performant
|
|
220
|
-
|
|
221
|
-
## ๐ ๏ธ Available modules
|
|
222
|
-
|
|
223
|
-
### **๐บ Arkhe** - Core utilities & data manipulation
|
|
224
|
-
|
|
225
|
-
_The modern "lodash/underscore" - Data manipulation utilities with modern approaches documented but ES2020 compatibility prioritized_
|
|
226
|
-
|
|
227
|
-
- **data** : Array, collection, function, language, number, object, string utilities
|
|
228
|
-
- **types** : TypeScript types and guards
|
|
229
|
-
|
|
230
|
-
### **๐ฏ Kanon** - Schema validation
|
|
231
|
-
|
|
232
|
-
_Lightweight and interchangeable alternative to Zod with simplified API and optimized performance_
|
|
233
|
-
|
|
234
|
-
- **core** : Core validation primitives and composites
|
|
235
|
-
- **schemas** : Pre-built validation schemas
|
|
236
|
-
- **validation** : Validation engine and error handling
|
|
237
|
-
|
|
238
|
-
### **โก๏ธ Zygos** - Functional programming
|
|
239
|
-
|
|
240
|
-
_Lightweight and interchangeable alternative to Neverthrow/fp-ts with functional monads for robust error handling_
|
|
241
|
-
|
|
242
|
-
- **result** : Result pattern implementation (lightweight Neverthrow alternative)
|
|
243
|
-
- **option** : Option/Maybe monad
|
|
244
|
-
- **either** : Either monad
|
|
245
|
-
- **task-either** : Async Either monad
|
|
246
|
-
|
|
247
|
-
### **๐ง Sphalma** - Error handling & error factories
|
|
248
|
-
|
|
249
|
-
_Error handling utilities and error factory patterns for consistent error management_
|
|
250
|
-
|
|
251
|
-
- **error-factory** : Error factory for creating typed, coded errors with consistent structure
|
|
252
|
-
|
|
253
|
-
### **โฐ๏ธ Taphos** - Legacy utilities & deprecated functions
|
|
254
|
-
|
|
255
|
-
_The resting place of utilities - Deprecated functions with clear migration paths to native APIs_
|
|
256
|
-
|
|
257
|
-
- **array** : Deprecated array utilities (fromPairs, flattenDepth, nth, tail, head)
|
|
258
|
-
- **object** : Deprecated object utilities (keys, values, extend, toPairs)
|
|
259
|
-
- **string** : Deprecated string utilities (startsWith, endsWith, padStart, padEnd, repeat, toLower, toUpper, trim)
|
|
260
|
-
- **function** : Deprecated function utilities (partial)
|
|
261
|
-
|
|
262
|
-
## ๐ Documentation
|
|
263
|
-
|
|
264
|
-
Full documentation available at [pithos.dev](https://pithos.dev)
|
|
265
|
-
|
|
266
|
-
For now, explore the source code and TSDoc comments โ every function is fully documented.
|
|
267
|
-
|
|
268
|
-
## ๐ง Most useful scripts
|
|
87
|
+
## ๐ง Development
|
|
269
88
|
|
|
270
89
|
```bash
|
|
271
|
-
#
|
|
272
|
-
pnpm
|
|
273
|
-
pnpm run dev # Build in watch mode
|
|
274
|
-
pnpm run test # Run all tests
|
|
275
|
-
pnpm run coverage # Run tests with coverage report
|
|
276
|
-
pnpm run lint # Lint code
|
|
277
|
-
pnpm run lint:fix # Lint and auto-fix issues
|
|
278
|
-
pnpm run check:types # Type-check without emitting files
|
|
279
|
-
pnpm run check:all # Run all checks (lint + types + tsdoc)
|
|
280
|
-
|
|
281
|
-
# Documentation
|
|
282
|
-
pnpm run doc:generate # Generate docs (runs snapshot tests at the end)
|
|
283
|
-
pnpm run doc:snapshots # Run doc snapshot tests only
|
|
284
|
-
pnpm run doc:snapshots:update # Update snapshots after intentional changes
|
|
285
|
-
|
|
286
|
-
# Analysis
|
|
287
|
-
pnpm run analyze:bundle # Analyze bundle size
|
|
288
|
-
pnpm run benchmark:kanon # Run benchmarks (supports filtering: pnpm run benchmark:kanon kanon,zod)
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
## โ ๏ธ Project Status
|
|
292
|
-
|
|
293
|
-
**Pithos is production-ready** for most modules, with **100% test coverage**.
|
|
294
|
-
|
|
295
|
-
| Module | Status | Notes |
|
|
296
|
-
| -------- | --------------- | ---------------------------------------------- |
|
|
297
|
-
| Arkhe | โ
Stable | Core utilities, fully tested |
|
|
298
|
-
| Kanon | โ
Stable | Schema validation |
|
|
299
|
-
| Zygos | โ
Stable | Result/Either/Option patterns |
|
|
300
|
-
| Sphalma | โ
Stable | Error handling |
|
|
301
|
-
| Taphos | โ
Stable | Deprecated utilities with migration paths |
|
|
302
|
-
|
|
303
|
-
**Philosophy**: Quality over quantity. Each utility is carefully crafted and optimized before being added.
|
|
304
|
-
|
|
305
|
-
## ๐ณ Tree Shaking
|
|
306
|
-
|
|
307
|
-
Pithos is optimized for tree shaking. Use direct imports for optimal bundle size:
|
|
308
|
-
|
|
309
|
-
```typescript
|
|
310
|
-
// โ
Good - only specific utilities included
|
|
311
|
-
import { chunk } from "pithos/arkhe/array/chunk";
|
|
312
|
-
import { debounce } from "pithos/arkhe/function/debounce";
|
|
313
|
-
|
|
314
|
-
// โ Less optimal - entire module included
|
|
315
|
-
import * as Arkhe from "pithos/arkhe";
|
|
316
|
-
import { chunk } from "pithos";
|
|
90
|
+
pnpm run dev # Build in watch mode
|
|
91
|
+
pnpm cli # Interactive CLI for tests, benchmarks, docs, and more
|
|
317
92
|
```
|
|
318
93
|
|
|
319
|
-
##
|
|
320
|
-
|
|
321
|
-
Pithos is designed to provide the most useful and reusable utilities possible, but it is **not intended to replace popular and specialized libraries** that already excel at their specific domains.
|
|
322
|
-
|
|
323
|
-
**In some cases**, certain implementations have been developed for simplicity and to achieve lighter bundles, but for more robust requirements, specialized libraries remain the recommended approach.
|
|
324
|
-
|
|
325
|
-
**Practical example**: Pithos offers lightweight validation with Kanon, but for complex form handling with UI frameworks, you might complement it with specialized form libraries like React Hook Form or Formik.
|
|
326
|
-
|
|
327
|
-
### ๐ Recommended Libraries
|
|
328
|
-
|
|
329
|
-
#### **๐งฎ Functional Programming**
|
|
330
|
-
|
|
331
|
-
- **Pithos Zygos** for Either and Task monads (interchangeable with fp-ts)
|
|
332
|
-
- **[fp-ts](https://github.com/gcanti/fp-ts)** for advanced features (functors, composition tools, and more)
|
|
333
|
-
|
|
334
|
-
#### **โ
Result Pattern**
|
|
335
|
-
|
|
336
|
-
- **Pithos Result** for lightweight error handling (~6KB, 100% API compatible with neverthrow)
|
|
337
|
-
- **[neverthrow](https://github.com/supermacro/neverthrow)** for advanced Result features
|
|
338
|
-
|
|
339
|
-
#### **๐ Data Validation & Parsing**
|
|
340
|
-
|
|
341
|
-
- **Pithos Kanon** for schema validation (lightweight, zero dependencies)
|
|
342
|
-
- **[Zod](https://zod.dev/)** for complex data transformations
|
|
343
|
-
|
|
344
|
-
#### **๐
Date Management**
|
|
345
|
-
|
|
346
|
-
- **Temporal** - Modern and standardized JavaScript API for date and time manipulation, built into the language with excellent TypeScript support
|
|
347
|
-
|
|
348
|
-
#### **๐ฌ Advanced Animations**
|
|
94
|
+
## ๐ Documentation
|
|
349
95
|
|
|
350
|
-
|
|
96
|
+
Full documentation, use cases, benchmarks, and migration guides at **[pithos.dev](https://pithos.dev)**
|
|
351
97
|
|
|
352
98
|
## ๐ค Contributing
|
|
353
99
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
### How to contribute:
|
|
357
|
-
|
|
358
|
-
1. **Fork** the repository
|
|
359
|
-
2. **Create** a feature branch (`git checkout -b feature/amazing-feature`)
|
|
360
|
-
3. **Commit** your changes (`git commit -m 'Add amazing feature'`)
|
|
361
|
-
4. **Push** to the branch (`git push origin feature/amazing-feature`)
|
|
362
|
-
5. **Open** a Pull Request
|
|
363
|
-
|
|
364
|
-
### Development setup:
|
|
365
|
-
|
|
366
|
-
```bash
|
|
367
|
-
git clone https://github.com/mopi1402/pithos.git
|
|
368
|
-
cd pithos
|
|
369
|
-
pnpm install
|
|
370
|
-
pnpm run dev
|
|
371
|
-
```
|
|
372
|
-
|
|
373
|
-
### Code style:
|
|
374
|
-
|
|
375
|
-
- Follow the existing TypeScript/ESLint configuration
|
|
376
|
-
- Write clear, documented code
|
|
377
|
-
- Add tests for new features
|
|
378
|
-
- Update documentation as needed
|
|
379
|
-
|
|
380
|
-
**Questions?** Open an issue or start a discussion!
|
|
100
|
+
Contributions welcome! See the [contribution guide](https://pithos.dev/guide/contribution/) for setup and guidelines.
|
|
381
101
|
|
|
382
102
|
## ๐ License
|
|
383
103
|
|