Package Exports
- funfix
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (funfix) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Funfix

Funfix is a library of data types for functional and asynchronous programming in Javascript.
Inspired by Scala, Cats and Monix.
Usage
npm install --save funfix
Features
- Option, which is like the "Maybe" monadic type from Haskell
- Either, for working with values of two possible types
- Try, for capturing exceptional results and manipulating them as values
- Eval for suspending synchronous side effects and controlling evaluation (e.g. memoization, error handling)
- IEquals interface for structural equality in is
- Cancelable / BoolCancelable, for describing composable cancellation actions
- more is coming (e.g.
Task
, etc)
See API Docs.
Typescript or Flow?
Funfix supports both Typescript and Flow type annotations out of the box.
It also makes the best use of the capabilities of each. For example Typescript has bivariant generics, but Flow supports variance annotations and Funfix makes use of them. Development happens in Typescript, due to better tooling, but both are first class citizens.
Semantic versioning
Funfix versioning follows the sematic versioning (semver) specification, meaning that versions have the $major.$minor.$patch
format, where any $major
increment means that a breaking change happened. It's also configured with a fully automated release process, triggered by any commits on master.
Recommended Companions
Projects for usage in combination with Funfix:
- Immutable.js: a library exposing immutable collections, by Facebook
- JSVerify: property based testing
Contributing
The Funfix project welcomes contributions from anybody wishing to participate. All code or documentation that is provided must be licensed with the same license that Funfix is licensed with (Apache 2.0).
Feel free to open an issue if you notice a bug, have an idea for a feature, or have a question about the code. Pull requests are also gladly accepted. For more information, check out the contributor guide.
License
All code in this repository is licensed under the Apache License, Version 2.0. See LICENCE.