Skip to content

GageSorrell/PipeOperator

Repository files navigation

Copyright © 2026 Gage Sorrell. Released under the MIT license.

@sorrell/pipe-operator

The pipe operator, implemented via tsover.

Documentation

The documentation is available here, a subdomain of the author's personal website.

Requirements

Package Version
NodeJS >=24.15.0
tsover >=6.0.0

Your project must also be set up to work with tsover. Their setup guide is available here.

Installation

Once the requirements are met, just install,

npm install @sorrell/pipe-operator

Example

"use tsover";
import { Pipe as P } from "@sorrell/pipe-operator";

const Value: number = 40;

const Product = (...Values: Array<number>): number =>
    Values.reduce((Prev, Curr) => Prev * Curr, 1);

const FormatDollar = (In: number): string => `$${ In }`;
 
const Price = Value 
    % P(Product, 3, 2)
    % P(FormatDollar);

// `Price` <- `"$240"`

Related Resources

Package Description
@sorrell/functional Other utilities for functional programming.
@sorrell/utilities General-purpose utilities.
@sorrell/cli-utilities Utilities for CLI applications.
@sorrell/cli CLI to assist with TypeScript development.

About

Implements the pipe operator in TypeScript via tsover.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors