Skip to content

urbandrone/futils

Repository files navigation

futils Logo

A collection of tools for functional programming in JavaScript

NPM

Build Status dependencies License: MIT

Note

⚠️ This project is in maintenance mode and won't receive further updates or changes. If you find a bug, please open a new issue and I'll look after it. In the meantime, you might be interested in my new project.

About

futils is a small (around 10 Kilobytes when minimized and gzipped) library for generic functional programming in javascript. It is divided into several namespaces which you can see below:

Package Namespace Description
Trampoline .trampoline Useful to create tail recursive functions in a not tail recursive language.
Operation .operation Functions that allow to operate with various data structures in a Point-Free form.
Lambda .lambda Contains helpers for working with functions, like curry, flip and compose.
ADT .adt Allows easy creation of algebraic single and union data types.
Generics .generics Building blocks for new data structures which can derive generic methods.
Monoid .monoid A collection of some of the most common monoidal structures like Sum and All.
Data .data Pre-made data structures. All of these implement various interface contracts (typeclasses).
Optic .optic van Laarhoven based lenses for Object and Array structures.

Documentation

Find the complete documentation as well as a quickstart online.

Download

The library can be loaded either by downloading it from NPM, by getting it from a CDN or by downloading it from Github.

Source Snippet
NPM npm i futils
CDN <script src="https://unpkg.com/futils@latest"></script>
Github <script src="local/path/to/futils.js"></script>

License: MIT
NPM: https://npmjs.org/package/futils
GitHub: https://github.com/urbandrone/futils