JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 57
  • Score
    100M100P100Q74793F
  • License MIT

A collection of useful utility types for TypeScript, including Option, Result, and more

Package Exports

  • @binarymuse/ts-stdlib
  • @binarymuse/ts-stdlib/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@binarymuse/ts-stdlib) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ts-stdlib

@binarymuse/ts-stdlib is a set of classes, utilities, and types to make working with TypeScript a little bit nicer. These concepts can be found in many different languages, although many of the implementations here are inspired by Rust.

The library includes:

Wrapper Types:

  • Option<T> - a type that represents a value (Some<T>) or the absence of one (None)
  • Result<T, E> - a type that represents a successful result (Ok<T>) or an error (Err<E>)
  • Rc<T> - a reference counted resource

Container Types:

  • Deque<T> - a double-ended queue, implemented with a doubly-linked list

Installation

npm install @binarymuse/ts-stdlib
# or
pnpm add @binarymuse/ts-stdlib
# or
yarn add @binarymuse/ts-stdlib

Documentation