Figment
GithubIssue TrackerSponsor
  • Introduction
  • F.A.Q.
  • Changelog
  • API
    • Functions
Powered by GitBook
On this page
  • Installation
  • Yarn
  • NPM
  • Prior Art
  • License

Was this helpful?

Introduction

NextF.A.Q.

Last updated 2 years ago

Was this helpful?

Figment is a collection of functional programming helpers. This is my personal collection of utilities and is not intended to be comprehensive.

The library is built in TypeScript and is manually curried to make the final parameter to functions (the data parameter) a separate callback to aid in composibility. For example, here is the signature of map from lodash:

type map = <T, U>(fn: (item: T) => U, items: T[]) => U[]
const increment = a => a + 1
const result = map(increment, [1, 2, 3])

And here is the signature this library uses:

type map = <T, U>(fn: (item: T) => U) => (items: T[]) => U[]
const increment = a => a + 1
const incrementList = map(increment)
const result = incrementList([1, 2, 3])

Installation

Yarn

yarn add @tdreyno/figment

NPM

npm install --save @tdreyno/figment

Prior Art

License

is a popular TypeScript library which implements functional concepts.

Figment is licensed under the Hippocratic License. It is an derived from the MIT License, amended to limit the impact of the unethical use of open source software.

fp-ts
Ethical Source license
npm latest version
Test Coverage