0.1.14 • Published 4 years ago

@0ti.me/tiny-pfp v0.1.14

Weekly downloads
1
License
GPL-3.0
Repository
github
Last release
4 years ago

Build Status Coverage Status

tiny-pfp

A lightweight alternative to lodash.

Functional Programming

const {fp} = require('@0ti.me/tiny-pfp');

const mapReduce = (mapFn, reduceFn, initialAccumulator) =>
  flow([fp.map(mapFn), fp.reduce(reduceFn, initialAccumulator)]);

const data = [1, 2, 3];

const result = mapReduce(each => 3 * each, (acc, each) => acc + each, 0)(data);

console.error(result); // Outputs the sum of 3x each item in data: 18
0.1.14

4 years ago

0.1.13

4 years ago

0.1.12

4 years ago

0.1.10

4 years ago

0.1.7

4 years ago

0.1.9

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.2

4 years ago