@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

Readme

Keywords

none

Package Sidebar

Install

npm i @bakkerjoeri/fp

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

4.09 kB

Total Files

18

Last publish

Collaborators

  • bakkerjoeri