File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,30 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
77---
88
9+ ## [[ 1.1.0]] ( https://github.com/richecr/holo-fn/releases/tag/v1.1.0 ) - 2025-11-30
10+
11+ ### Added
12+ - ** ` filter ` method for ` Maybe ` ** : Validates values with a predicate, converting ` Just ` to ` Nothing ` when the predicate fails.
13+ - Added ` filter(predicate: (value: T) => boolean): Maybe<T> ` method to ` Maybe ` interface.
14+ - Added curried ` filter ` function for use with ` pipe ` .
15+ - Example:
16+ ``` ts
17+ just (25 ).filter (x => x >= 18 ).unwrapOr (0 ); // 25
18+ just (15 ).filter (x => x >= 18 ).unwrapOr (0 ); // 0
19+ ```
20+
21+ - ** ` validate ` method for ` Result ` and ` Either ` ** : Validates values with custom error messages.
22+ - Added ` validate(predicate: (value: T) => boolean, error: E): Result<T, E> ` to ` Result ` .
23+ - Added ` validate(predicate: (value: R) => boolean, leftValue: L): Either<L, R> ` to ` Either ` .
24+ - Added curried ` validate ` functions for use with ` pipe ` .
25+ - Example:
26+ ``` ts
27+ ok (25 ).validate (x => x >= 18 , ' Must be 18+' ).unwrapOr (0 ); // 25
28+ ok (15 ).validate (x => x >= 18 , ' Must be 18+' ).isErr (); // true
29+ ```
30+
31+ ---
32+
933## [[ 1.0.0]] ( https://github.com/richecr/holo-fn/releases/tag/v1.0.0 ) - 2025-06-25
1034
1135### Added
You can’t perform that action at this time.
0 commit comments