1.0.4 ā€¢ Published 1 year ago

functional-utils-eamon v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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!