kirka
TypeScript icon, indicating that this package has built-in type declarations

6.1.0 • Public • Published

Kirka

Algebraic data types Rust-style for Typescript

If you want to ask something - Go to Discussions

If you found a bug - Go to Issues

📖 Big inspiration from fp-ts, @sweet-monads

👇👇👇 Modules

- Option<T> - Forget about nulls and undefined

- Result<T, E> - Handle errors like a god

- Iter<T> - Lazy iterables with superpowers

- Schema - Pseudo pattern-matching for js

👆👆👆 Everything is described within modules

Installation

npm i kirka
# or
npm i github:numfin/kirka
# or fork it and instal from your own repo

Usage described in modules readme. All documentation inside JSDoc (autocomplete)

Why not fp-ts?

  1. I tried fp-ts
  2. I realised they have terrible documentation.
  3. Using things required reading ton of types and remembering everything.
  4. My friend suggested trying sweet-monads.

Why not sweet-monads

  • No documentation
  • Not a lot of functionality (e.g. conversions between types)
  • Typing looks weak (tons of overloads without reason)
  • Lack of esm support
  • Class context complexity

Readme

Keywords

none

Package Sidebar

Install

npm i kirka

Weekly Downloads

68

Version

6.1.0

License

ISC

Unpacked Size

488 kB

Total Files

843

Last publish

Collaborators

  • numblefingers