ghoullier / boxed

Utility types for functional TypeScript

Home Page:https://swan-io.github.io/boxed

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@swan-io/boxed logo

@swan-io/boxed

mit licence npm version bundlephobia

Utility types for functional TypeScript

Boxed provides functional utility types and functions, while focusing on ease-of-use.

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<Value>
  • Result<Ok, Error>
  • Future<Value>
  • AsyncData<Value>
  • Lazy<Value>
  • Some utils like Deferred, Dict & Array

Installation

$ yarn add @swan-io/boxed
# --- or ---
$ npm install --save @swan-io/boxed

Links

About

Utility types for functional TypeScript

https://swan-io.github.io/boxed

License:MIT License


Languages

Language:TypeScript 97.2%Language:JavaScript 2.8%