Skip to content


Switch branches/tags


Failed to load latest commit information.
Latest commit message
Commit time

Build status Code Climate Become a patron Discord chat Twitter Follow


"A collection of functional programming libraries that can be composed together. Unlike a framework, is a suite of instruments and you (the user) must be the composer of. Geared towards versatility, not any specific type of music." — @loganpowell via Twitter

Please visit for additional information & topic based search of packages relevant to your use cases...

This mono-repository is home to 166+ TypeScript/ES6 projects, a wide and jointly developed collection of packages and building blocks for (non-exhaustive list of topics):

  • Functional programming (ES6 iterators/generators, composition, memoization, transducers, multi-methods)
  • Reactive programming, stream / transducer based dataflow graphs / pipelines
  • Data structures & data transformations for wide range of use cases (maps, sets, heaps, queues, graphs etc.)
  • 2D geometry generation, shape primitives, math, manipulation, intersections, conversions & visualizations
  • Canvas abstractions, pixel buffers & SVG serialization/conversion
  • Vector, matrix (dense & sparse), ECS implementations with optional support for strided memory layouts
  • Semi-declarative WebGL 1/2 abstraction layer
  • DSL for shader functions defined in TypeScript and cross-compilation to GLSL, JS, VEX etc.
  • Value-based equivalence
  • DSP building blocks: oscillators, noise generators, filters, 1D FFT/IFFT, muxers, rate converters
  • Immutable data handling, state containers, transacted state updates, Undo-Redo history
  • Data driven UI component toolkits (DOM-based, canvas-based, immediate-mode, multiple approaches...)
  • Multi-format, multi-channel pixel buffers (int & float based), conversions, dithering, Porter-Duff alpha-blending operators
  • Color space/format conversions, matrix based color manipulation, gradient generators, color palettes
  • Date-time abstraction, relative dates, iterators, formatters, math
  • WebWorker workflow abstractions
  • PEG-style functional parser combinators w/ (optional) custom grammar definition language
  • Forth-style pointfree DSL for functional composition and DSL development/extension
  • S-expression parser & runtime (interpreter) infrastructure for custom DSL creation
  • Low-level tooling for binary data, shared memory/WASM/WebGL interop
  • SIMD batch-processing of vector data
  • Various interpolations, math helpers, automatic differentiation (Dual numbers)
  • etc. (see package overview below)

This project is NOT a framework, provides no turn-key, one-size-fits-all approach and instead encourages a mix & match philosophy for various key aspects of application design (in & outside the browser). Most customization points only expect certain interfaces/type signatures rather than concrete implementations.

All packages:

  • are versioned independently
  • distributed as ESM modules (ES2020 syntax) with export maps, TypeScript typings & change logs
  • highly modular with largely only single function / class (only closely related functions) per file to help w/ selective imports and tree shaking
  • provide re-exports of all their publics for full library imports
  • have either none or only internal runtime dependencies
  • declare public interfaces, enums & types in an api.ts and/or constants.ts file (larger packages only)
  • have auto-generated online documentation at
  • licensed under Apache Software License 2.0

Getting started

The sheer number and varied nature & purpose of these packages makes it impossible to provide traditional "Getting started" tutorials. To compensate, this repo provides a large number of example projects, detailed readmes (at the very least for all the larger and/or more important packages) and smaller usage examples in the docstrings.

Examples & Showcase

There's a steadily growing number (100+) of standalone examples (different complexities, often combining functionality from several packages) in the examples directory.

Example screenshots (small selection)

Due to other priorities still very much in its infancy & planning stage, but please help to document your own usage of these packages by contributing project information to the repo, which will be used to build a showcase site... Thank you!

Generative art projects

Several generative art projects by Karsten Schmidt on fx(hash) have been created exclusively with libraries from this collection.

De/Frag series
Quasiflock C-SCAPE

Blog posts

Community, contributing, getting help

Join our little community on our Discord server or get in touch via Twitter or the issue tracker. If you'd like to contribute, please first read this document.

In general, we welcome contributions of all kinds (docs, examples, bug fixes, feature requests, financial contributions etc.). You can find a fairly detailed overview for contributors here:

Note: The default branch for this repo is develop and all PRs should be created based on this branch. This too means, the README files on this branch might refer to yet-unreleased features or packages. Please use the main branch for viewing the most recently released version(s)!.

Also please be sure to check the wiki for other project-wide information, tidbits, useful snippets etc.


Important changes (10/2021)

All packages are now only published in ESM format (ES2020 syntax) with TypeScript typings. You can find more details & rationale in issue #315.

As a result (and opportunity), many packages have undergone internal restructuring, some have been split up. All are now fully supporting deep-imports (based on declared export maps), leading to drastically smaller userland bundle sizes.

Previously we also created & published CommonJS & UMD formats, but deemed them an unnecessary burden & hindrance, since all important JS tooling/platforms do support ES modules by now.

Latest updates

As of: 2022-06-28

Status Project Version Changelog version changelog version changelog version changelog


Project Version Changelog Description version changelog Declarative & functional CLI arg parsing & coercions version changelog Common types, decorators, mixins version changelog Basic benchmarking helpers version changelog Type & value checks version changelog Comparators version changelog Functional composition helpers version changelog Date/time iterators, formatters, rounding version changelog Dynamic multiple dispatch version changelog n-D distance metrics & K-nearest neighborhoods version changelog Deep value equivalence checking version changelog Custom error types version changelog Conditional global variable exposition version changelog Hex value formatters for U4-64 words version changelog Basis infrastructure for arbitrary logging version changelog Function memoization w/ customizable caching version changelog Pattern based query engine for JS objects version changelog Parser combinators & AST generator/transformer version changelog Immutable nested object accessors version changelog Higher-order string formatting utils version changelog Minimal life cycle container for stateful app components version changelog Minimal test runner


Project Version Changelog Description version changelog Dual number algebra / automatic differentiation version changelog DSP utils, composable signal gens/processors version changelog Fuzzy logic primitives & rule inference engine version changelog Open/closed intervals, queries, set ops version changelog Assorted common math functions & utilities version changelog Matrix operations version changelog Sparse matrix & vector impls version changelog Fixed & arbitrary-length vector ops


Project Version Changelog Description version changelog 1D colored noise generators version changelog K-sortable unique identifiers, binary & base-N encoded version changelog n-D Low discrepancy sequence generators version changelog Seedable PRNG implementations, distributions & utilities version changelog PRNG impl & utilities for fxhash projects

File / file format support

Project Version Changelog Description version changelog Bencode binary format encoding version changelog Customizable CSV parser/object mapper version changelog Graphviz DOM & export version changelog WAV file format exporter version changelog Assorted file I/O utils for NodeJS version changelog Wavefront OBJ model parser version changelog CSS from nested JS data structures version changelog Type-checked HTML5 element wrappers for hiccup version changelog Hiccup-to-Markdown serialization version changelog hiccup based SVG vocab version changelog IGES format geometry serialization version changelog Markdown table generator / formatter version changelog File extension to MIME type mappings version changelog 1/8/16/24bit NetPBM image format reader/writer version changelog Linked Data, RDF & xmlns prefixes/URLs version changelog SAX-like XML parser / transducer

Iterator, stream & sequence processing

Project Version Changelog Description version changelog Channel based async ops version changelog FSM / parser primitives version changelog 2D grid iterator strategies version changelog ES6 generators / iterators version changelog Lisp/Clojure-style sequence abstraction version changelog Composable data transformations version changelog Binary data related transducers version changelog Finite state transducer version changelog Transducer based hdom UI updates version changelog Patch-based, array & object editing version changelog Technical / statistical analysis

Reactive programming

Project Version Changelog Description version changelog Push-based, reactive event stream primitves version changelog Adapter bridge CSP -> rstream version changelog Graphviz visualization of rstream topologies version changelog Mouse & touch event stream abstraction version changelog Declarative dataflow graph construction version changelog Hierarchical structured data logging version changelog Log-file output handler version changelog Triple store & query engine

Algorithms & data structures

Project Version Changelog Description version changelog Adjacency matrices & graph algorithms version changelog Array utilities version changelog Alt Set & Map implementations version changelog Immutable value wrappers, views, history version changelog 1D/2D bit field implementations version changelog In-memory caches / strategies version changelog Highly configurable 1D Cellular automata version changelog Doubly-linked list version changelog Array & object diffing version changelog Dependency graph version changelog Entity-Component System version changelog Extensible Graph Format version changelog Genetic programming helpers / AST gen version changelog Binary & d-ary heap impls version changelog Versioned ID generation / free-list version changelog K-means clustering of n-D data version changelog Parametric, interpolated lookup tables version changelog Quad-edge, dual-graph data structure version changelog DAG computations & value resolution version changelog Vector clock functions / comparators version changelog Immutable tree editing / navigation

Frontend / UI

Project Version Changelog Description version changelog HDPI canvas adaptation / styling util version changelog Asset/canvas/file download helpers version changelog String diffing w/ hiccup output (includes CLI) version changelog Hiccup based VDOM & diffing version changelog hdom adapter for hiccup-canvas version changelog hdom based UI components version changelog hdom mock implementation (testing / prototyping) version changelog S-expression based HTML/XML serialization version changelog hiccup interpreter for canvas api version changelog IBM Carbon icons in hiccup format version changelog Immediate mode GUI version changelog Composable event handlers & processor version changelog Reactive, diff-less, async UI components version changelog rdom component wrapper for version changelog Unstyled, customizable component collection version changelog Customizable browser & non-browser router version changelog Text-mode canvas, drawing, tables, charts version changelog Color text formatting w/ ANSI & HTML presets

Geometry, image & visualization

Project Version Changelog Description version changelog Color conversions, gradients version changelog Collection of image-based color palettes version changelog Dependency graph -> Graphviz version changelog Image based distance field generation version changelog Visualization, instrumentation for version changelog 2D only geometry types & ops version changelog Spatial indexing data structures version changelog Shared types & interfaces version changelog 2D elliptic arc utils version changelog 2D line clipping version changelog 2D convex polygon clipping version changelog Closest point helpers version changelog Fuzzy 2D shape drawing / filling version changelog 2D convex hull (Graham scan) version changelog Point & shape intersection tests version changelog 2D contour line extraction version changelog 2D polygon helpers version changelog nD polyline / curve resampling version changelog 2D SDF creation, conversions, operators, utilities version changelog nD cubic / quadratic spline ops version changelog nD iterative subdivision curves version changelog nD convex polygon tessellators version changelog 2D iterative delaunay/voronoi version changelog Extensible L-System architecture version changelog Multi-format pixel buffers version changelog Image dithering w/ various algorithm presets version changelog nD Poisson disk sampling version changelog Alpha blending / compositing ops version changelog Shape drawing, filling & rasterization version changelog Extensible 2D/3D scenegraph version changelog WebAssembly SIMD vector batch processing version changelog Declarative & functional data visualization toolkit


Project Version Changelog Description version changelog AST DSL for x-platform shader code version changelog GLSL code generator version changelog JS code generator version changelog AST code optimization strategies version changelog 100+ useful AST shader functions version changelog WebGL 1/2 / GPGPU facilities version changelog MSDF font rendering version changelog Shadertoy-like WebGL setup

Low-level, binary, memory management

Project Version Changelog Description version changelog Arbitrary base-n encoding/decoding with presets version changelog Assorted binary / bitwise ops, utilities version changelog Bitwise input / output streams version changelog Digital logic ops / constructs version changelog WASM based LEB128 varint encoder / decoder version changelog Raw & typed array memory pool & allocator version changelog Z-order-curve / Morton coding version changelog Binary data Range encoder / decoder version changelog Run-length encoding data compression version changelog Memory mapped data structures & serialization version changelog Wrapper for C-like structs / unions version changelog Data structures for memory mapped vectors


Project Version Changelog Description version changelog Stack-based DSL & functional composition version changelog Forth-like syntax layer for version changelog S-Expression parser & runtime infrastructure


git clone
cd umbrella

yarn install
yarn build

Once the entire mono-repo has been fully built at least once before, individual packages can then be (re)built like so:

yarn workspace run build

# or

(cd packages/transducers && yarn build)

Building example projects

Please see the example build instructions in the wiki for further details.


(Most, but not all packages have tests)

Due to various build/config issues/complexities, we're now using our own minimal test runner

yarn test

# or individually
yarn workspace run test


Autogenerated documentation (using TypeDoc) will be saved under /packages/*/doc/ and is also available at

yarn doc

Furthermore, an experimental tsdoc-based documentation repo provides an alternative markdown output including cross-references between all packages, but currently isn't frequently updated (only every few months):


© 2015 - 2022 Karsten Schmidt // Apache Software License 2.0


Thanks goes to these wonderful people (emoji key):

Karsten Schmidt

💻 📖 🚧 💵


💻 💡 🐛 🤔 💵

Arthur Carabott

💻 🤔 💡 📝 💵

André Wachter

💻 🤔 🐛

Gavin Cannizzaro

💻 🐛 🤔

Logan Powell

📖 🐛 🤔 💵

Marcin Ignac





🐛 💻 🤔 💵

Yifan Wu

🐛 📖


💻 🐛



Bnaya Peretz

💻 🐛 🤔



Nik Shevchenko

🐛 💻

Matei Adriel

💻 🐛 🤔

Pierre Grimaud


Matt Huebert


Raphael Saunier


Eric Ihli


David Pham



🐛 🤔

Pedro Henriques dos Santos Teixeira


Jamie Owen

💻 🐛

Robert Kesteson

🐛 💻

Chancy Kennedy


Jarred Sumner


Jamie Slome

🐛 🛡️


🐛 🛡️

Jannis Pohlmann


Shakthi Prasad G S

🐛 💻

Robin Gower


Michael Latzoni


Z Yin


Damien Seguin

🐛 💻

Rui Gil



💻 🚇 🚧

Tyler Freeman

🐛 💻



David Negstad


Muhammad Ridho

🐛 💻

This project follows the all-contributors specification. Contributions of any kind welcome!