JavaScript > Functional Programming
Contents
Libraries
A practical functional library for JavaScript that is designed specifically for a functional programming style. A style that makes it easy to create functional pipelines and never mutates user data. +TS.
is a community-maintained extension of Ramda.
is set of utility point-free functions composed only from Ramda functions.
A faster alternative to Ramda in under 10kB.
Extended version of Rambda
An instance of Lodash with its methods wrapped to produce immutable, auto-curried, iteratee-first, data-last methods. +TS.
Powerful iterator utilities for TypeScript with statistical operations, windowing, and lazy evaluation. +TS
A lightweight functional JavaScript library that facilitates currying and point-free / tacit programming.
A modern and modular JavaScript utility library made to work well with vanilla JavaScript methods. -TS
A functional library for CoffeeScript (and JavaScript) to facilitate functional composition and higher order functions.
A tiny (2.7kb) functional programming library using native ES5/6 operations. -TS.
A practical functional programming library for promises.
Hardcore Functional Programming for JavaScript. -TS.
Functional tools that couldn’t be simpler. A dead simple functional utility belt, hand-crafted with love and attention. -TS.
A simple function to curry a function.
Curry your functions using function bind syntax.
Compose a new function from smaller functions.
A collection of functions which aid in making non-functional libraries functional.
The full ECMAScript API done a functional way.
Replace JSX in React with functions (currying, compositions and etc).
A functional user interface library with unidirectional dataflow and a virtual dom.
An experiment in adding functional pattern matching to JavaScript. Experimental
A functional utility library for working with JavaScript dates. All functions in date-fp are pure, autocurried and will not mutate the date objects they are applied to.
An immutable date and time library that provides a simple, domain-driven and clean API based on the ISO8601 calendar.
A micro library that encourages functional programming by making native methods available as partially applied functions.
A property-based testing library for clearly specifying code invariants and behaviour.
FP library for JavaScript by Kyle Simpson (aka getify). Supports named-argument style methods.
Javascript parser combinator implementation inspired by the Haskell's Parsec
An abstraction for managing asynchronous code in JS. Tasks are similar to Promises with the key difference that Tasks can represent a computation while Promises can represent only the results of a computation. Ships with Flow type definitions.
Ultra-high performance reactive programming to help you compose asynchronous operations on streams of values and events without many of the hazards of side effects and mutable shared state.
The simplest signal library possible
Funfix is a library of type classes and data types for Functional Programming in JavaScript, TypeScript and Flow. +CT, +TS.
Arrays, Strings and things the functional way. A 640b functional library based on native methods. -TS.
An extremely small, intuitive and fast functional utility library for JavaScript -TS.
A small library provides simple usages of basic FP & pattern-matching/sumtype & MonadIO/Rx & Optional for Javascript. -TS.
Grid Computing Framework, Network & Thread extension of TSTL, supporting RFC (Remote Function Call). +TS.
Iterator library with support for objects as iterables, lazy evaulation andpipe(); implements Traits (from Rust)/Type Classes (from Haskell) in JS. -TS.
Typed functional programming in TypeScript. +CT, +TS.
a rich toolset for working with iterables, both sync and async. +TS.
A collection of functional utilities that could conceivably be part of a library like lodash/fp, but for some reason or other are not.
[a]synchronous functional syntax
Powerful pipes, that chain Promise and ADT like Maybe or Either from popular FP libraries. +TS
Comprehensive Curry Library with Operator Curry, Curry from functions, Decurry and Infifnite Curries.
A Lazy Functional Iteration Library Supporting Sync, Async, and Concurrent Iteration.
TypeScript multimethods inspired by Clojure multimethods. +TS
Tiny TypeScript functional dependency injection, based on Node.js AsyncLocalStorage. +TS
A Fully-fledged functional effect system for typescript with a rich standard library. +TS
A type-safe, functional, performant, lawful, composable data structure that solves practical problems of effect-full code in node and browser. +TS
Powerful dependency injection container for building modular apps. +TS
Reactive state and effect management with RxJS. +TS
Lazy evaluation and concurrency. +TS
Fast, modern, and practical utility library for FP in TypeScript. (Uses a data-first approach like remeda, but is faster than remeda, ramda, rambda, and lodash/fp.)
JS/TS lightweight value-multimethod util
A library for safe, idiomatic null and error handling in TypeScript, with Maybe and Result types, supporting both a functional style and a more traditional method-call style
The exhaustive Pattern Matching library for TypeScript, with smart type inference. Pattern Matching is a code-branching technique coming from FP languages.
Natural effect system that fits TypeScript; Write codes as you write plain typescript code.
Super lightweight function that looks and behaves like a pipe operator.
A powerful JavaScript functional programming toolset, including utility functions and abstract data structures.
Microscopic functional programming context aka dependency injection. +TS
Pipes with easy mocking, intended for huge amount of unit tests. +TS
A curated collection of 130+ common-use filter functions. Written in a functional programming style. Lightweight direct imports. Supports ES modules and CommonJS. 100% Unit tested. +TS
A tiny TypeScript library for handling side effects in a unified way using algebraic effects. +TS
A Lazy Functional Iteration Library Supporting Sync, Async, and Concurrent Iteration.
Fast, modern, and practical utility library for FP in TypeScript. (Uses a data-first approach like remeda, but is faster than remeda, rambda, and lodash/fp.)
Data Structures
Utilities for treating frozen JavaScript objects as persistent immutable collections
Immutable persistent data collections.
Immer is a tiny package for immutable state based on copy-on-write mechanism. +TS.
ClojureScript’s persistent data structures and supporting API from the comfort of vanilla JavaScript.
persistent and optionally immutable data tree with cursors.
High performance implementation of Immutable Sequence in JavaScript, based on Finger Trees.
Functional Reactive State for JavaScript and TypeScript. DerivableJS enables you to make elegant declarative statements about how your bits of state are related. +TS.
Library for creating and manipulating lazy iterables using the ES2015 iteration protocols.
Super high-performance immutable data structures for modern JavaScript and TypeScript applications. +TS.
An extremely fast immutable list with a comprehensive functional API. Designed to seamlessly integrate with Ramda.
Immutable persistent collections, functional constructs such as Option and Either, and combinators. Implemented in Typescript but supports javascript too. +CT, +TS.
C++ STL (Standard Template Library) is implemented in TypeScript. STL Containers, iterators, algorithms and functors, that following functional programming rule, are provided. +TS.
Algebraic Data Types
Not a library, but a specification of the Monad laws for libraries to follow.
Specification similar to Fantasy Land but based on static methods rather than instance methods.
FantasyLand extensions for Immutable.js.
Library for creating tagged constructors.
Sanctuary makes it possible to write safe code without null checks. +CT, +TS.
A small JavaScript library for defining and using union types.
A collection of Free monads.
A Future library with included control utilities, high performance and great error messages.
Common combinators.
Port of the Haskell package Data.Aviary.Birds. Everything for your combinatory needs.
A collection of popular Algebraic Data Types with the main goal to curate and provide not only a common interface between each type, but also all of the helper functions needed to hit the ground running. -TS.
A small utility library with a set of Algebraic Data Types and Helper functions to help you write code in a functional programming style in Javascript
Functional programming library for TypeScript focusing on ADTs. +CT, +TS.
an async-first, opinionated, and functional language designed to have 100% compatibility with JavaScript engines
Small, simple, easy FP data types for pragmatic and productive developers who need to ship reliable code fast. +CT, +TS.
Tifi is a library for functional programming in TypeScript. It solves a problem of the existence of both undefined and null. Tifi is inspired by the OCaml/Reason utilities for the option data type. +CT, +TS.
A collection of popular monads (such as Either and Maybe) and the lazy iterator.
This package contains a Result type that represents either success (Ok) or failure (Err).
Lenses
Composable kmett style lenses.
Profunctor optics (Lens, Prism, iso).
Lens library built on Ramda.
Composable, immutable getters and setters. (Profunctor lenses WIP)
Lenses with dotty support.
Partial lenses is a comprehensive, high-performance optics library for JavaScript.
A lodash-inspired lens-like library for Javascript.
Functional Languages that Compile to JavaScript
Compiles Clojure, a hosted Lisp with immutable persistent data structures, to JavaScript.
Haskell to JavaScript compiler, based on GHC.
Compiles a subset of Elixir, a dynamic, functional language designed for building scalable and maintainable applications, to JavaScript.
A multi-paradigm programming language with gradual and duck typing that targets PHP and JS.
no BS JS
A Lisp that compiles to opinionated JavaScript on top of RamdaJS
RacketScript aims to leverage both JavaScript and Racket's ecosystem, and make interoperability between them clean and smooth.
Programming Tools
ESLint rules for functional programming
A functional assertions library. If you prefer functional style APIs and practices in JavaScript, this library aims to solve this with functionally-oriented assertions that are lazy and monadic.
Runtime type checking for JS with Hindley Milner signatures.
A pluggable runtime type checker and functional debugging tool that supports parametric and row polymorphism, implicit rank-2 types and algebraic data types via Scott Encoding.
Community
Related Lists
A curated list of awesome (functional) reactive programming stuff in JavaScript.
Awesome resources on functional programming theory and learning materials.
A ton of articles on functional programming, as well as a huge list of functional libraries for many programming languages.
A Learning Path for Functional Programming