Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.0.0] - 2025-06-25
Added
- First stable release of
holo-fn
with core monads:Maybe
,Either
, andResult
. Maybe
monad:Just
,Nothing
, and helper functions likefromNullable
.- Added methods like
map
,chain
,unwrapOr
,match
, andequals
. Either
monad:Left
, 'Right', and helper functions liketryCatch
,fromPromise
,fromAsync
.- Added methods like
map
,chain
,unwrapOr
,match
, andequals
. Result
monad:Ok
,Err
, and helper functions likefromThrowable
,fromPromise
,fromAsync
.- Added methods like
map
,chain
,unwrapOr
,match
, andequals
. - Introduced
curried functions
formap
,chain
,unwrapOr
, andmatch
for each monad: map
,chain
,unwrapOr
, andmatch
forEither
,Maybe
andResult
.Export restructuring
:- Now, monads are imported from their specific files, instead of a global import.
- Example:
1 2 3 4
import { M, E, R } from "holo-fn"; import { fromNullable } from 'holo-fn/maybe'; import { tryCatch } from 'holo-fn/either'; import { fromThrowable } from 'holo-fn/result';
Changed
Migration to Bun
: The library is now compatible withBun
runtime, offering better performance and faster execution.- Reorganized the imports for better modularization and performance.
- Now, to use specific monads and functions, you must import from their respective files.
Fixed
- Fixed
bug
related to circular imports. - Optimized the library for faster loading and reduced bundle size.
[0.3.0] - 2025-05-10
Added
- New helpers functions:
- Maybe:
- just(value: T): Maybe
: Creates a Just
value representing the presence of a value. - nothing
(): Maybe : Creates a Nothing
value representing the absence of a value.
- just(value: T): Maybe
- Either:
- left
(value: L): Either : Creates a Left
value representing a failure or error. - right
(value: R): Either : Creates a Right
value representing a success.
- left
- Result:
- ok
(value: T): Result : Creates an Ok
value representing the success of an operation with a value. - err
(error: E): Result : Creates an Err
value representing a failure of an operation with an error.
- ok
[0.2.0] - 2025-04-26
Added
- Introduced the
equals
method for Maybe, Either, and Result types to compare instances of these types based on their internal values. - Added curried functions for
equals
to allow for easier composition and usage: equalsM
for Maybe.equalsE
for Either.equalsR
for Result.- New helper functions for easy comparison between monadic values.
Changed
- Refined the API for better type inference and consistency across all functional types (
Maybe
,Either
,Result
). - Improved type safety for curried functions in all monads.
[0.1.0] - 2025-04-23
Added
- Initial release of holo-fn with core monads:
Maybe
,Either
, andResult
. Maybe
monad:Just
,Nothing
, and helper functions likefromNullable
.Either
monad:Left
,Right
,tryCatch
,fromPromise
,fromAsync
.Result
monad:Ok
,Err
,fromThrowable
,fromPromise
,fromAsync
.- Added curried handlers for
map
,chain
,unwrapOr
, andmatch
for better composition and functional pipelines: mapE
,chainE
,unwrapOrE
, andmatchE
forEither
.mapM
,chainM
,unwrapOrM
, andmatchM
forMaybe
.mapR
,chainR
,unwrapOrR
, andmatchR
forResult
.