A mono-repository with functional programming helpers, algebraic data types, util functions, types and even some micro-frameworks in TypeScript. They were designed to support multiple environments (even older browsers and ESM Node.js).
-
๐ฆ Packages distributed in ESM, CommonJS, UMD and UMD minified formats.
-
โก Lightweight, tree-shakeable and side-effects free packages.
-
๐ Bateries included:
-
Little to none dependencies.
-
Almost every package work independently.
-
Package | Description |
---|---|
@bitty/animate |
Create and manage animation functions with browser's AnimationFrame API. |
@bitty/create-request |
Apply interceptors to fetch and create a custom request function. |
@bitty/deferred |
It provides a function to create Deferred objects. They contain a Promise and methods to imperatively resolve or reject it. |
@bitty/either |
An algebraic data type that represents a value of one of two possible types (a disjoint union). |
@bitty/event-emitter |
Emit and listen events in any class, object or function without messing them extending classes. |
@bitty/falsy |
Falsy helper functions and types for TypeScript. |
@bitty/format-date |
A small library (around 400 B when gziped & minified) to format JavaScript Date object using same tokens as moment. |
@bitty/get |
A really small and type-safe (requires TypeScript >= 4.1.3) function, that gets a nested value from an object using a path string (like "a.b[0].d"). If value is 'undefined' or unreachable returns the placeholder instead. |
@bitty/insist |
Insistently runs a callback and only resolves the promise when its result is truthy. |
@bitty/json |
Types and type-safe functions for JSON. |
@bitty/maybe |
An algebraic data type that is a container for an optional values. |
@bitty/nullish |
Nullish helper functions and types for TypeScript. |
@bitty/pipe |
A pipe function to perform function composition in LTR (Left-To-Right) direction. |
@bitty/predicate |
Predicate and Refinement types for TypeScript. |
All the packages are released under MIT License.