https://github.com/swan-io/boxed?
Essential building-blocks for functional & safe TypeScript code
https://github.com/swan-io/boxed?
adt fp functional future monads option result typescript
Last synced: 3 months ago
JSON representation
Essential building-blocks for functional & safe TypeScript code
- Host: GitHub
- URL: https://github.com/swan-io/boxed?
- Owner: swan-io
- License: mit
- Created: 2022-03-19T15:42:21.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-27T10:53:31.000Z (6 months ago)
- Last Synced: 2024-10-30T06:57:53.526Z (6 months ago)
- Topics: adt, fp, functional, future, monads, option, result, typescript
- Language: TypeScript
- Homepage: https://swan-io.github.io/boxed
- Size: 61.4 MB
- Stars: 686
- Watchers: 6
- Forks: 23
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-typesafe - swan-io/boxed - Essential building-blocks for functional & safe TypeScript code. (**1. Libraries** / Functional Programming)
README
# @swan-io/boxed
[](https://github.com/swan-io/boxed/blob/main/LICENSE)
[](https://www.npmjs.org/package/@swan-io/boxed)
[](https://bundlephobia.com/result?p=@swan-io/boxed)> Essential building-blocks for functional & safe TypeScript code
**Boxed** provides essential building-blocks (in the form of types and functions) so that you can write functional, safe TypeScript code.
## Design principles
- Provide utility types that **make data-manipulation and storage easier**
- **Immutable** (all provided types are)
- Give a **good development experience** (chaining API, reliable types)
- Simple **interoperability** (you can convert back and forth to JS native types)
- Compatibility with `ts-pattern` (using `patterns` we provide).## What's in the box?
- `Option`
- `Result`
- `Future`
- `AsyncData`
- `Lazy`
- Some utils like `Deferred`, `Dict` & `Array`## Installation
```bash
$ yarn add @swan-io/boxed
# --- or ---
$ npm install --save @swan-io/boxed
```## Links
- 📘 [**Documentation**](https://boxed.cool)
- ⚖️ [**License**](./LICENSE)