functype 0.15.0 → 0.17.0

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 CHANGED
@@ -68,50 +68,11 @@ For detailed optimization strategies, see the [Bundle Optimization Guide](docs/B
68
68
 
69
69
  ### Option
70
70
 
71
- ```typescript
72
- import { Option, Some, None } from "functype"
73
-
74
- // Create options
75
- const value = Option("hello") // Some("hello")
76
- const empty = Option(null) // None
77
- const explicit = Some(42) // Some(42)
78
-
79
- // Transform values
80
- const length = value.map((s) => s.length) // Some(5)
81
- const nothing = empty.map((s) => s.length) // None
82
-
83
- // Handle default values
84
- const result = value.getOrElse("world") // "hello"
85
- const fallback = empty.getOrElse("world") // "world"
86
-
87
- // Conditionally filter
88
- const filtered = value.filter((s) => s.length > 10) // None
89
- ```
71
+ {@includeCode test/docs/documentation-examples.spec.ts#readme-option-basic}
90
72
 
91
73
  ### Either
92
74
 
93
- ```typescript
94
- import { Either, Right, Left } from "functype"
95
-
96
- // Success case
97
- const success = Right<string, number>(42)
98
- // Error case
99
- const failure = Left<string, number>("error")
100
-
101
- // Transform values (map only applies to Right)
102
- const doubled = success.map((x) => x * 2) // Right(84)
103
- const stillError = failure.map((x) => x * 2) // Left("error")
104
-
105
- // Handle errors
106
- const value = success.getOrElse(0) // 42
107
- const fallback = failure.getOrElse(0) // 0
108
-
109
- // Pattern matching with fold
110
- const result = success.fold(
111
- (err) => `Error: ${err}`,
112
- (val) => `Success: ${val}`,
113
- ) // "Success: 42"
114
- ```
75
+ {@includeCode test/docs/documentation-examples.spec.ts#readme-either-basic}
115
76
 
116
77
  ### List
117
78
 
@@ -687,6 +648,10 @@ opt.forEach(console.log) // Logs: 42
687
648
  list.forEach(console.log) // Logs: 1, 2, 3, 4, 5
688
649
  ```
689
650
 
651
+ ## Feature Matrix
652
+
653
+ For a comprehensive overview of which interfaces are supported by each data structure, see the [Functype Feature Matrix](docs/FUNCTYPE_FEATURE_MATRIX.md).
654
+
690
655
  ## Type Safety
691
656
 
692
657
  Functype leverages TypeScript's advanced type system to provide compile-time safety for functional patterns, ensuring that your code is both robust and maintainable.
@@ -835,6 +800,32 @@ For more details, see the [Error Formatting Guide](docs/error-formatting.md).
835
800
  - [ ] Implement more type-level utilities (conditional types, template literals)
836
801
  - [ ] Leverage newer TypeScript features (const type parameters, tuple manipulation)
837
802
 
803
+ ## Claude Code Skills
804
+
805
+ Functype provides two specialized Claude Code skills to enhance your development experience:
806
+
807
+ ### Functype User Guide
808
+
809
+ Help for developers using functype in their projects:
810
+
811
+ - Pattern conversion (imperative → functional)
812
+ - API lookup and examples
813
+ - Common use cases and debugging tips
814
+
815
+ **Install**: Download from [dist/skills/functype-user.zip](./dist/skills/functype-user.zip)
816
+
817
+ ### Functype Library Developer
818
+
819
+ Guide for contributors developing functype itself:
820
+
821
+ - Architecture patterns and development workflow
822
+ - Creating new data structures
823
+ - Testing strategies and interface implementation
824
+
825
+ **Install**: Download from [dist/skills/functype-developer.zip](./dist/skills/functype-developer.zip)
826
+
827
+ See [.claude/skills/README.md](./.claude/skills/README.md) for complete installation and usage instructions.
828
+
838
829
  ## Contributing
839
830
 
840
831
  Contributions are welcome! Please feel free to submit a Pull Request.