@thi.ng/umbrella
About
"A collection of functional programming libraries that can be composed together.
Unlike a framework, thi.ng 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
Mono-repository for 100+ thi.ng TypeScript/ES6 projects, a wide
collection of largely data transformation oriented packages and building
blocks for:
- Functional programming (composition, memoization, transducers, multi-methods)
- ES6 iterators
- Stream based, reactive programming, dataflow graphs / pipelines
- WebWorker workflow abstractions
- Data structures & data transformations for wide range of use cases (list, sets, maps)
- Value-based equivalence
- FSM primitives, parser generators
- Data driven UI components, event & side effect handling
- Canvas-based Immediate mode GUI components
- Immutable data handling, state containers, transacted state updates, Undo-Redo history
- 2D geometry generation, processing, conversion & visualization
- Vector & matrix implementations with optional support for strided layouts, SIMD etc.
- Color space conversions, cosine gradients
- Multi-format pixel buffers, conversions, Porter-Duff alpha-blending operators
- Declarative WebGL 1/2 abstraction layer
- S-expression parser & runtime infrastructure for custom DSL creation
- DSL for shader functions defined in TypeScript and cross-compilation to GLSL, JS, VEX etc.
- Low-level tooling for binary data, shared memory / WASM / WebGL interop
- etc. (see package overview below)
...all with a keen eye on simplicity, re-use & minimalism without
sacrificing flexibility.
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 rather than concrete implementations.
Most packages:
- have detailed, individual README files w/ small usage examples
- are versioned independently
- distributed in ES6 syntax and multiple format (ESM, CommonJS, UMD)
 with TypeScript typings & changelogs
- highly modular with largely only a few closely related functions or
 single function / class per file to help w/ tree shaking
- provide re-exports of all their publics for full library imports
- have either none or only @thi.ng internal runtime dependencies
- have been used in production
- declare public interfaces, enums & types in an src/api.tsfile
 (larger packages only)
- auto-generated online documentation at docs.thi.ng
- licensed under Apache Software License 2.0
Examples
There's a steadily growing number (~70) of standalone examples
(different complexities, often combining functionality from several
packages) in the examples directory.
Blog posts
- 
"Of umbrellas, transducers, reactive streams & mushrooms" (ongoing series): 
Community
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.
Projects
New / unreleased packages in development
(These packages are still unreleased and only available on their feature or develop branches)
- @thi.ng/transducers-patch - Reducers for patch-based, array & object editing
Fundamentals, Project, Version, Changelog, Description, -------------------------------------------, -----------------------------------------------------------------------------------------------------------------, -----------------------------------------------, ----------------------------------------------, @thi.ng/api,  , changelog, Common types, decorators, mixins,
, changelog, Common types, decorators, mixins, @thi.ng/bench,  , changelog, Basic benchmarking helpers,
, changelog, Basic benchmarking helpers, @thi.ng/checks,  , changelog, Type & value checks,
, changelog, Type & value checks, @thi.ng/compare,  , changelog, Comparator,
, changelog, Comparator, @thi.ng/compose,  , changelog, Functional composition helpers,
, changelog, Functional composition helpers, @thi.ng/defmulti,  , changelog, Dynamic multiple dispatch,
, changelog, Dynamic multiple dispatch, @thi.ng/dsp,  , changelog, DSP utils, oscillators,
, changelog, DSP utils, oscillators, @thi.ng/ecs,  , changelog, Entity-Component System,
, changelog, Entity-Component System, @thi.ng/equiv,  , changelog, Deep value equivalence checking,
, changelog, Deep value equivalence checking, @thi.ng/errors,  , changelog, Custom error types,
, changelog, Custom error types, @thi.ng/math,  , changelog, Assorted common math functions & utilities,
, changelog, Assorted common math functions & utilities, @thi.ng/memoize,  , changelog, Function memoization w/ customizable caching,
, changelog, Function memoization w/ customizable caching, @thi.ng/paths,  , changelog, Immutable nested object accessors,
, changelog, Immutable nested object accessors, @thi.ng/random,  , changelog, Seedable PRNG implementations w/ unified API,
, changelog, Seedable PRNG implementations w/ unified API, @thi.ng/strings,  , changelog, Higher-order string formatting utils, ### Iterator, stream & sequence processing, Project, Version, Changelog, Description, ---------------------------------------------------------------, -------------------------------------------------------------------------------------------------------------------------------------, ---------------------------------------------------------, -----------------------------------------,
, changelog, Higher-order string formatting utils, ### Iterator, stream & sequence processing, Project, Version, Changelog, Description, ---------------------------------------------------------------, -------------------------------------------------------------------------------------------------------------------------------------, ---------------------------------------------------------, -----------------------------------------, @thi.ng/csp,  , changelog, Channel based async ops,
, changelog, Channel based async ops, @thi.ng/fsm,  , changelog, FSM / parser primitives,
, changelog, FSM / parser primitives, @thi.ng/grid-iterators,  , changelog, 2D grid iterator strategies,
, changelog, 2D grid iterator strategies, @thi.ng/iterators,  , changelog, ES6 generators / iterators,
, changelog, ES6 generators / iterators, @thi.ng/sax,  , changelog, SAX-like XML parser / transducer,
, changelog, SAX-like XML parser / transducer, @thi.ng/seq,  , changelog, Lisp/Clojure-style sequence abstraction,
, changelog, Lisp/Clojure-style sequence abstraction, @thi.ng/transducers,  , changelog, Composable data transformations,
, changelog, Composable data transformations, @thi.ng/transducers-binary,  , changelog, Binary data related transducers,
, changelog, Binary data related transducers, @thi.ng/transducers-fsm,  , changelog, Finite state transducer,
, changelog, Finite state transducer, @thi.ng/transducers-hdom,  , changelog, Transducer based hdom UI updates,
, changelog, Transducer based hdom UI updates, @thi.ng/transducers-stats,  , changelog, Technical / statistical analysis, ### Reactive programming, Project, Version, Changelog, Description, -----------------------------------------------------------, ---------------------------------------------------------------------------------------------------------------------------------, -------------------------------------------------------, ----------------------------------------------,
, changelog, Technical / statistical analysis, ### Reactive programming, Project, Version, Changelog, Description, -----------------------------------------------------------, ---------------------------------------------------------------------------------------------------------------------------------, -------------------------------------------------------, ----------------------------------------------, @thi.ng/rstream,  , changelog, Push-based, reactive event stream primitves,
, changelog, Push-based, reactive event stream primitves, @thi.ng/rstream-csp,  , changelog, Adapter bridge CSP -> rstream,
, changelog, Adapter bridge CSP -> rstream, @thi.ng/rstream-dot,  , changelog, Graphviz visualization of rstream topologies,
, changelog, Graphviz visualization of rstream topologies, @thi.ng/rstream-gestures,  , changelog, Mouse & touch event stream abstraction,
, changelog, Mouse & touch event stream abstraction, @thi.ng/rstream-graph,  , changelog, Declarative dataflow graph construction,
, changelog, Declarative dataflow graph construction, @thi.ng/rstream-log,  , changelog, Hierarchical structured data logging,
, changelog, Hierarchical structured data logging, @thi.ng/rstream-log-file,  , changelog, Log-file output handler,
, changelog, Log-file output handler, @thi.ng/rstream-query,  , changelog, Triple store & query engine, ### Data structures, Project, Version, Changelog, Description, -------------------------------------------------, -----------------------------------------------------------------------------------------------------------------------, --------------------------------------------------, ------------------------------------------,
, changelog, Triple store & query engine, ### Data structures, Project, Version, Changelog, Description, -------------------------------------------------, -----------------------------------------------------------------------------------------------------------------------, --------------------------------------------------, ------------------------------------------, @thi.ng/adjacency,  , changelog, Adjacency matrices & graph algorithms,
, changelog, Adjacency matrices & graph algorithms, @thi.ng/arrays,  , changelog, Array utilities,
, changelog, Array utilities, @thi.ng/associative,  , changelog, Alt Set & Map implementations,
, changelog, Alt Set & Map implementations, @thi.ng/atom,  , changelog, Immutable value wrappers, views, history,
, changelog, Immutable value wrappers, views, history, @thi.ng/bitfield,  , changelog, 1D/2D bit field implementations,
, changelog, 1D/2D bit field implementations, @thi.ng/cache,  , changelog, In-memory caches / strategies,
, changelog, In-memory caches / strategies, @thi.ng/dcons,  , changelog, Doubly-linked list,
, changelog, Doubly-linked list, @thi.ng/diff,  , changelog, Array & object diffing,
, changelog, Array & object diffing, @thi.ng/dgraph,  , changelog, Dependency graph,
, changelog, Dependency graph, @thi.ng/gp,  , changelog, Genetic programming helpers / AST gen,
, changelog, Genetic programming helpers / AST gen, @thi.ng/heaps,  , changelog, Binary & d-ary heap impls,
, changelog, Binary & d-ary heap impls, @thi.ng/idgen,  , changelog, Versioned ID generation / free-list,
, changelog, Versioned ID generation / free-list, @thi.ng/intervals,  , changelog, Open/closed intervals, queries, set ops,
, changelog, Open/closed intervals, queries, set ops, @thi.ng/ramp,  , changelog, Parametric, interpolated lookup tables,
, changelog, Parametric, interpolated lookup tables, @thi.ng/quad-edge,  , changelog, Quad-edge, dual-graph data structure,
, changelog, Quad-edge, dual-graph data structure, @thi.ng/resolve-map,  , changelog, DAG computations & value resolution,
, changelog, DAG computations & value resolution, @thi.ng/sparse,  , changelog, Sparse matrix & vector impls,
, changelog, Sparse matrix & vector impls, @thi.ng/zipper,  , changelog, Immutable tree editing / navigation, ### Frontend / UI, Project, Version, Changelog, Description, -----------------------------------------------------------------, ---------------------------------------------------------------------------------------------------------------------------------------, ----------------------------------------------------------, --------------------------------------------------,
, changelog, Immutable tree editing / navigation, ### Frontend / UI, Project, Version, Changelog, Description, -----------------------------------------------------------------, ---------------------------------------------------------------------------------------------------------------------------------------, ----------------------------------------------------------, --------------------------------------------------, @thi.ng/hdom,  , changelog, Hiccup based VDOM & diffing,
, changelog, Hiccup based VDOM & diffing, @thi.ng/hdom-canvas,  , changelog, hdom based declarative canvas drawing,
, changelog, hdom based declarative canvas drawing, @thi.ng/hdom-components,  , changelog, hdom based UI components,
, changelog, hdom based UI components, @thi.ng/hdom-mock,  , changelog, hdom mock implementation (testing / prototyping),
, changelog, hdom mock implementation (testing / prototyping), @thi.ng/hiccup,  , changelog, S-expression based HTML/XML serialization,
, changelog, S-expression based HTML/XML serialization, @thi.ng/hiccup-carbon-icons,  , changelog, IBM Carbon icons in hiccup format,
, changelog, IBM Carbon icons in hiccup format, @thi.ng/hiccup-css,  , changelog, CSS from nested JS data structures,
, changelog, CSS from nested JS data structures, @thi.ng/hiccup-markdown,  , changelog, Hiccup-to-Markdown serialization,
, changelog, Hiccup-to-Markdown serialization, @thi.ng/hiccup-svg,  , changelog, hiccup based SVG vocab,
, changelog, hiccup based SVG vocab, @thi.ng/imgui,  , changelog, Immediate mode GUI,
, changelog, Immediate mode GUI, @thi.ng/interceptors,  , changelog, Composable event handlers & processor,
, changelog, Composable event handlers & processor, @thi.ng/router,  , changelog, Customizable browser & non-browser router, ### Geometry & visualization, Project, Version, Changelog, Description, ---------------------------------------------------------------, -------------------------------------------------------------------------------------------------------------------------------------, ---------------------------------------------------------, ------------------------------------------,
, changelog, Customizable browser & non-browser router, ### Geometry & visualization, Project, Version, Changelog, Description, ---------------------------------------------------------------, -------------------------------------------------------------------------------------------------------------------------------------, ---------------------------------------------------------, ------------------------------------------, @thi.ng/color,  , changelog, Color conversions, gradients,
, changelog, Color conversions, gradients, @thi.ng/dot,  , changelog, Graphviz DOM & export,
, changelog, Graphviz DOM & export, @thi.ng/geom,  , changelog, 2D only geometry types & ops,
, changelog, 2D only geometry types & ops, @thi.ng/geom-accel,  , changelog, Spatial indexing data structures,
, changelog, Spatial indexing data structures, @thi.ng/geom-api,  , changelog, Shared types & interfaces,
, changelog, Shared types & interfaces, @thi.ng/geom-arc,  , changelog, 2D elliptic arc utils,
, changelog, 2D elliptic arc utils, @thi.ng/geom-clip,  , changelog, 2D convex line/shape clipping,
, changelog, 2D convex line/shape clipping, @thi.ng/geom-closest-point,  , changelog, Closest point helpers,
, changelog, Closest point helpers, @thi.ng/geom-hull,  , changelog, 2D convex hull (Graham scan),
, changelog, 2D convex hull (Graham scan), @thi.ng/geom-isec,  , changelog, Point & shape intersection tests,
, changelog, Point & shape intersection tests, @thi.ng/geom-isoline,  , changelog, 2D contour line extraction,
, changelog, 2D contour line extraction, @thi.ng/geom-poly-utils,  , changelog, 2D polygon helpers,
, changelog, 2D polygon helpers, @thi.ng/geom-resample,  , changelog, nD polyline / curve resampling,
, changelog, nD polyline / curve resampling, @thi.ng/geom-splines,  , changelog, nD cubic / quadratic spline ops,
, changelog, nD cubic / quadratic spline ops, @thi.ng/geom-subdiv-curve,  , changelog, nD iterative subdivision curves,
, changelog, nD iterative subdivision curves, @thi.ng/geom-tessellate,  , changelog, nD convex polygon tessellators,
, changelog, nD convex polygon tessellators, @thi.ng/geom-voronoi,  , changelog, 2D iterative delaunay/voronoi,
, changelog, 2D iterative delaunay/voronoi, @thi.ng/iges,  , changelog, IGES format geometry serialization,
, changelog, IGES format geometry serialization, @thi.ng/lsys,  , changelog, Extensible L-System architecture,
, changelog, Extensible L-System architecture, @thi.ng/matrices,  , changelog, Matrix operations,
, changelog, Matrix operations, @thi.ng/pixel,  , changelog, Multi-format pixel buffers,
, changelog, Multi-format pixel buffers, @thi.ng/poisson,  , changelog, nD Poisson disk sampling,
, changelog, nD Poisson disk sampling, @thi.ng/porter-duff,  , changelog, Alpha blending / compositing ops,
, changelog, Alpha blending / compositing ops, @thi.ng/scenegraph,  , changelog, Extensible 2D/3D scenegraph,
, changelog, Extensible 2D/3D scenegraph, @thi.ng/simd,  , changelog, WebAssembly SIMD vector batch processing,
, changelog, WebAssembly SIMD vector batch processing, @thi.ng/vectors,  , changelog, Fixed & arbitrary-length vector ops, ### WebGL / GPGPU, Project, Version, Changelog, Description, -------------------------------------------------------------, -----------------------------------------------------------------------------------------------------------------------------------, --------------------------------------------------------, ------------------------------------,
, changelog, Fixed & arbitrary-length vector ops, ### WebGL / GPGPU, Project, Version, Changelog, Description, -------------------------------------------------------------, -----------------------------------------------------------------------------------------------------------------------------------, --------------------------------------------------------, ------------------------------------, @thi.ng/shader-ast,  , changelog, AST DSL for x-platform shader code,
, changelog, AST DSL for x-platform shader code, @thi.ng/shader-ast-glsl,  , changelog, GLSL code generator,
, changelog, GLSL code generator, @thi.ng/shader-ast-js,  , changelog, JS code generator,
, changelog, JS code generator, @thi.ng/shader-ast-stdlib,  , changelog, 100+ useful AST shader functions,
, changelog, 100+ useful AST shader functions, @thi.ng/webgl,  , changelog, WebGL 1/2 / GPGPU facilities,
, changelog, WebGL 1/2 / GPGPU facilities, @thi.ng/webgl-msdf,  , changelog, MSDF font rendering,
, changelog, MSDF font rendering, @thi.ng/webgl-shadertoy,  , changelog, Shadertoy-like WebGL setup, ### Low-level, binary, memory management, Project, Version, Changelog, Description, ---------------------------------------------------, -------------------------------------------------------------------------------------------------------------------------, ---------------------------------------------------, -----------------------------------------------,
, changelog, Shadertoy-like WebGL setup, ### Low-level, binary, memory management, Project, Version, Changelog, Description, ---------------------------------------------------, -------------------------------------------------------------------------------------------------------------------------, ---------------------------------------------------, -----------------------------------------------, @thi.ng/bencode,  , changelog, Bencode binary format encoding,
, changelog, Bencode binary format encoding, @thi.ng/binary,  , changelog, Assorted binary / bitwise ops, utilities,
, changelog, Assorted binary / bitwise ops, utilities, @thi.ng/bitstream,  , changelog, Bitwise input / output streams,
, changelog, Bitwise input / output streams, @thi.ng/dlogic,  , changelog, Digital logic ops / constructs,
, changelog, Digital logic ops / constructs, @thi.ng/leb128,  , changelog, WASM based LEB128 varint encoder / decoder,
, changelog, WASM based LEB128 varint encoder / decoder, @thi.ng/malloc,  , changelog, Raw & typed array memory pool & allocator,
, changelog, Raw & typed array memory pool & allocator, @thi.ng/morton,  , changelog, Z-order-curve / Morton coding,
, changelog, Z-order-curve / Morton coding, @thi.ng/range-coder,  , changelog, Binary data Range encoder / decoder,
, changelog, Binary data Range encoder / decoder, @thi.ng/rle-pack,  , changelog, Run-length encoding data compression,
, changelog, Run-length encoding data compression, @thi.ng/soa,  , changelog, Memory mapped data structures & serialization,
, changelog, Memory mapped data structures & serialization, @thi.ng/unionstruct,  , changelog, Wrapper for C-like structs / unions,
, changelog, Wrapper for C-like structs / unions, @thi.ng/vector-pools,  , changelog, Data structures for memory mapped vectors, ### DSLs, Project, Version, Changelog, Description, -------------------------------------------------------, -----------------------------------------------------------------------------------------------------------------------------, -----------------------------------------------------, -----------------------------------------------,
, changelog, Data structures for memory mapped vectors, ### DSLs, Project, Version, Changelog, Description, -------------------------------------------------------, -----------------------------------------------------------------------------------------------------------------------------, -----------------------------------------------------, -----------------------------------------------, @thi.ng/pointfree,  , changelog, Stack-based DSL & functional composition,
, changelog, Stack-based DSL & functional composition, @thi.ng/pointfree-lang,  , changelog, Forth-like syntax layer for @thi.ng/pointfree,
, changelog, Forth-like syntax layer for @thi.ng/pointfree, @thi.ng/sexpr,  , changelog, S-Expression parser & runtime infrastructure, ## Building
, changelog, S-Expression parser & runtime infrastructure, ## Building
git clone https://github.com/thi-ng/umbrella.git
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:
lerna run build --scope @thi.ng/transducers
Building example projects
Please see the example build
instructions
in the wiki for further details.
Testing
(most, but not all packages have tests)
yarn test
# or individually
lerna run test --scope @thi.ng/rstream
Coverage
The resulting reports will be saved under /packages/*/coverage/lcov-report/.
yarn cover
Documentation
Autogenerated documentation (using
TypeDoc) will be saved under
/packages/*/doc/ and is also available at docs.thi.ng.
yarn doc
License
© 2018 Karsten Schmidt // Apache Software License 2.0
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
 該所有者的項目
                                                                (
                                                                該所有者的項目
                                                                (