/functional-utils

utils for functional programing

Primary LanguageTypeScript

Welcome to functional-utils-eamon 👋

Version License: MIT

utils for functional programing

Install

$ npm install functional-utils-eamon

$ yarn add functional-utils-eamon

Test

$ npm run test

$ yarn test

Functional Utils

non-lazy version

  • forEach
  • map
  • filter
  • reduce
  • pipe

lazy version

  • forEach
  • map
  • filter
  • reduce
  • take

Usage

import { forEach, filter, map, pipe } from 'functional-utils-eamon';

const data = [1, 2, 4];

pipe(
  filter((x) => x > 1),
  map((x) => x * 2),
  forEach((x) => console.log(x))
)(data); // [4,8]

Author

👤 eamon3481

Show your support

Give a ⭐️ if this project helped you!