@bakkerjoeri/fp
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

fp

Installation

npm install @bakkerjoeri/fp

Usage

compose

Returns a composed function:

import { compose } from '@bakkerjoeri/fp';

const timesTwo = (a: number) => {
	return a * 2;
};

const plusTwo = (a: number) => {
	return a + 2;
};

const result = compose(timesTwo, plusTwo)(2) // => 8

pipe

Returns a piped function:

import { pipe } from '@bakkerjoeri/fp';

const timesTwo = (a: number) => {
	return a * 2;
};

const plusTwo = (a: number) => {
	return a + 2;
};

const result = pipe(timesTwo, plusTwo)(2) // => 6

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i @bakkerjoeri/fp

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

4.09 kB

Total Files

18

Last publish

Collaborators

  • bakkerjoeri