New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

pipe-pipefy

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pipe-pipefy

Combine functions calling each function with the output of the last one

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

pipe-pipefy

pipe-pipefy allows to combine functions, calling each function with the output of the last one.

Usage

import { pipe } from 'pipe-pipefy';

const getName = (person) => person.name;
const uppercase = (string) => string.toUpperCase();

const person = { name: 'Mathieu' };

const result =
  pipe(
    getName,
    uppercase
  )(person);

expect(result).toBe('MATHIEU');
import { pipe, pipefy } from 'pipe-pipefy';

const getName = (person) => person.name;
const uppercase = (string) => string.toUpperCase();
const repeat = (string, n) => string.repeat(n);

const person = { name: 'Mathieu' };

const result =
  pipe(
    getName,
    uppercase,
    pipefy(repeat, 2)
  )(person);

expect(result).toBe('MATHIEUMATHIEU');

Installation

You can get pipe-pipefy via npm.

$ npm install pipe-pipefy --save

Keywords

pipe, pipeline, compose

FAQs

Package last updated on 04 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts