Fp-filters – A curated collection of TS/JS array filter functions
Hello HN, I wanted to share a library I've been working on called: fp-filters - A curated collection of 130+ common-use filter functions that are written (and can be used) in a functional programming style. Why I built this: I have noticed in several codebases the tendency to keep writing the same or similar filter functions over and over again. Often inlined, taxing readability. And realized that most of them do pretty much the same N things. Therefore they could be isolated, curated, and maintained separately. fp-filters provides 130+ composable, point-free filtering functions that make…
In plain words
fp-filters is a TypeScript/JavaScript library containing over 130 reusable filter functions designed for functional programming. It addresses the problem of filter logic being repeatedly written inline across codebases by providing composable, point-free predicates that can be combined and chained. The library targets developers who want more readable and maintainable data transformation pipelines. Functions are pure with no side effects and work as both predicates and filters.
written from the facts on this page · September 2026
From the sources
In the maker’s words, at launch
Hello HN, I wanted to share a library I've been working on called: fp-filters - A curated collection of 130+ common-use filter functions that are written (and can be used) in a functional programming style. Why I built this: I have noticed in several codebases the tendency to keep writing the same or similar filter functions over and over again. Often inlined, taxing readability. And realized that most of them do pretty much the same N things. Therefore they could be isolated, curated, and maintained separately. fp-filters provides 130+ composable, point-free filtering functions that make data transformation pipelines more readable and maintainable. All functions are predicates and can be used as such, but they shine when used as filters. Key features: 1. Pure functional approach with no side effects 2. Composable predicates (and, or, not combinators through fp-booleans) 3. Common filter patterns as reusable functions 4. Type safety with TypeScript definitions 5. Exported as both esm and cjs 6. Zero dependencies, tiny footprint 7. Individual exports. Tree shaking is not even needed. 8. 100% test coverage Example usage: const input = [[1, 2, 3], [2, 4], [0, 4, 8, 16]]; // JS input.filter((array) => array.every((element) => element % 2 === 0)); // fp-filters input.filter(everyElement(isEven)) // JS dates.filter((date) => { const day = date.getDay(); return day === 0 || day === 6; }); // fp-filters dates.filter(isWeekend); // JS array.filter((arg) => arg.length > 0); // fp-filters array.filter(isNotEmpty); What makes this different: Unlike lodash/fp or ramda, fp-filters focuses specifically on array filtering patterns with an emphasis on readability in complex data transformations. It's designed to be intuitive for developers already familiar with JavaScript's array methods while providing the benefits of functional composition. The project is MIT licensed and open to contributions. I'd love to hear feedback from the HN community. Links: npm: https://www.npmjs.com/package/fp-filters GitHub: https://github.com/Oaxoa/fp-filters Documentation: https://oaxoa.github.io/fp-filters Thanks for checking it out
Does the same job
all alternatives →
- SLs3-lambda – Lambda functions over S3 objects: each, map, reduce, filter2017 · github.com · ▲177




More life & fun this month
the category →- TL
Life & fun · 10d ago · louisabraham.github.io

Photosynthesis fires two of your iPhone
Life & fun · 29d ago · photosynthesis.camera
SoloUno▲310Take control of hair pulling, nail biting & skin picking
Life & fun · 28d ago · solouno.io

Scroll through all 43,252,003,274,489,856,000 reachable Rubik's Cube permutations.
Life & fun · 26d ago · everycube.alen.is


Hi HN, I built Eigendrum, a web tool that solves the 2D wave equation for arbitrary shapes so you can hear what they sound like as drums. How it works: * Solves -∇²u = λu using finite element analysis (Kφ = λMφ) on a triangle mesh. * Validated to <0.1% error against closed-form solutions for circles (Bessel zeros) and rectangles. * Sound model factors in strike location, Rayleigh damping, and mallet width. * Includes Kac drums I & II to demonstrate identical sound spectra from different geometries. * No frameworks, build steps, or dependencies. Repo and tests:…
Life & fun · 27d ago · baselashraf81.github.io
Launched alongside, April 2025
the whole month →- IB
Hi everyone, I built PyXL — a hardware processor that executes a custom assembly generated from Python programs, without using a traditional interpreter or virtual machine. It compiles Python -> CPython Bytecode -> Instruction set designed for direct hardware execution. I’m sharing an early benchmark: a GPIO test where PyXL achieves a 480ns round-trip toggle — compared to 14-25 micro seconds on a MicroPython Pyboard - even though PyXL runs at a lower clock (100MHz vs. 168MHz). The design is stack-based, fully pipelined, and preserves Python's dynamic typing without static type restrictions.…
Dev tools · 2025 · runpyxl.com
- UC
Life & fun · 2025 · filiph.github.io
- IB
https://the-pocket.github.io/Tutorial-Codebase-Knowledge/
AI · 2025 · github.com


