Show HN: FP-pack – Functional pipelines in TypeScript without monads

https://news.ycombinator.com/rss Hits: 1
Summary

fp-pack A practical functional toolkit for JavaScript and TypeScript. Written in TypeScript with full type safety, fp-pack works seamlessly in both JavaScript and TypeScript projects. fp-pack is a focused collection of functional programming utilities designed for real-world applications. It emphasizes function composition, immutability, and declarative code through pipe and pipeAsync , while remaining approachable for everyday developers. The concept is simple: if you understand functions, pipes, and currying, you can use fp-pack immediately. There's no framework and no heavy abstractions—just well-chosen helpers that make functional style easier to adopt and maintain in production code. Table of Contents Why fp-pack? 🔄 Pipe-First Philosophy Built around pipe and pipeAsync for clean, left-to-right function composition. ⚡ SideEffect Pattern Handle errors and side effects declaratively in SideEffect-aware pipelines. Use pipeSideEffect / pipeAsyncSideEffect to short-circuit on SideEffect without breaking composition. Focus on business logic, not error plumbing. For strict effect unions, use pipeSideEffectStrict / pipeAsyncSideEffectStrict . 📘 JavaScript & TypeScript Works seamlessly in JavaScript. Written in TypeScript for robust type inference when you need it. 🎯 Practical & Production-Ready Covers the patterns you write every day—data transformation, composition, control flow, and async operations. 🪶 Lightweight & Modular Zero dependencies and tree-shakeable modules. 💧 Lazy Stream Processing Efficient iterable processing with stream/* functions for memory-conscious operations on large datasets. Design Principles Pipe-centric composition pipe (sync) and pipeAsync (async) are the primary composition tools. All utilities are designed to work seamlessly in pipe chains. Pragmatic error handling The SideEffect pattern handles errors and side effects declaratively in pipeSideEffect / pipeAsyncSideEffect pipelines. Write normal functions that compose naturally—these pipelin...

First seen: 2026-01-03 19:18

Last seen: 2026-01-03 19:18