Skip to content

swan-io/boxed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Oct 22, 2024
9b22e5d · Oct 22, 2024
Dec 15, 2023
Oct 18, 2024
Oct 22, 2024
Oct 22, 2024
Oct 22, 2024
Mar 21, 2022
Mar 21, 2022
Apr 25, 2023
Mar 22, 2022
Oct 22, 2024
Mar 21, 2022
Apr 20, 2024
Oct 22, 2024
Oct 18, 2024
Oct 20, 2024
Mar 19, 2022
Mar 11, 2024

Repository files navigation

@swan-io/boxed logo

@swan-io/boxed

mit licence npm version bundlephobia

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<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