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-fnwith core monads:Maybe,Either, andResult. Maybemonad:Just,Nothing, and helper functions likefromNullable.- Added methods like
map,chain,unwrapOr,match, andequals. Eithermonad:Left, 'Right', and helper functions liketryCatch,fromPromise,fromAsync.- Added methods like
map,chain,unwrapOr,match, andequals. Resultmonad:Ok,Err, and helper functions likefromThrowable,fromPromise,fromAsync.- Added methods like
map,chain,unwrapOr,match, andequals. - Introduced
curried functionsformap,chain,unwrapOr, andmatchfor each monad: map,chain,unwrapOr, andmatchforEither,MaybeandResult.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 withBunruntime, 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
bugrelated 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 Justvalue representing the presence of a value. - nothing
(): Maybe : Creates a Nothingvalue representing the absence of a value.
- just(value: T): Maybe
- Either:
- left
(value: L): Either : Creates a Leftvalue representing a failure or error. - right
(value: R): Either : Creates a Rightvalue representing a success.
- left
- Result:
- ok
(value: T): Result : Creates an Okvalue representing the success of an operation with a value. - err
(error: E): Result : Creates an Errvalue representing a failure of an operation with an error.
- ok
[0.2.0] - 2025-04-26
Added
- Introduced the
equalsmethod for Maybe, Either, and Result types to compare instances of these types based on their internal values. - Added curried functions for
equalsto allow for easier composition and usage: equalsMfor Maybe.equalsEfor Either.equalsRfor 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. Maybemonad:Just,Nothing, and helper functions likefromNullable.Eithermonad:Left,Right,tryCatch,fromPromise,fromAsync.Resultmonad:Ok,Err,fromThrowable,fromPromise,fromAsync.- Added curried handlers for
map,chain,unwrapOr, andmatchfor better composition and functional pipelines: mapE,chainE,unwrapOrE, andmatchEforEither.mapM,chainM,unwrapOrM, andmatchMforMaybe.mapR,chainR,unwrapOrR, andmatchRforResult.