https://github.com/swan-io/boxed
Utility types for functional TypeScript
https://github.com/swan-io/boxed
adt fp functional future option result typescript
Last synced: 3 months ago
JSON representation
Utility types for functional TypeScript
- 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-03-27T13:25:40.000Z (about 1 year ago)
- Last Synced: 2024-04-14T15:57:27.143Z (about 1 year ago)
- Topics: adt, fp, functional, future, option, result, typescript
- Language: TypeScript
- Homepage: https://swan-io.github.io/boxed
- Size: 36.8 MB
- Stars: 606
- Watchers: 4
- Forks: 16
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
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)