Skip to content

trustyoo86/pipfit

Repository files navigation

pipfit

Utilities for functional programming in pipeline. It is pipeline for function with same parameters. Many plugins what support functional programming has logic that next function have to use parameter prev function's return data. It is functional programming logic commonly, but Sometimes, We need to use pipeline function with same paramters. So, pipfit is not logic that use prev function's return data, and use same paramters all functions.

Install

  • use npm
npm i pipfit

Usage

// insert paramter 'object' string (it is default value)
const pipe = require('pipfit')('object');
const fnA = (a) => ({ a });
const fnB = (a, b) => ({ b });
const fns = pipe(fnA, fnB);
const data = fns(1, 2);

console.log(data);
// { a: 1, b: 2 }

Contribute

If you contribute for this plugin, fork this repo, and Pull request. Feel free for csontribute pipfit plugin, and development packages in pipfit.

Contacts

About

Functions using pipeline

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages