A pipelining operator to allow postfix syntax for function invocation in the absence of a real pipelining operator.
pnpm i @pauliojanpera/pipe-operator
import { pipeOperator as to } from '@pauliojanpera/pipe-operator';
// f(f(2)) == 8
const f = (v: Number): number => v.valueOf() * 2;
console.log((2)[to](f)[to](f)); // '8'
// g([1,2,3]) == '1-2-3'
const g = (numbers: number[]): string => numbers.join('-');
console.log([1, 2, 3][to](g)); // '1-2-3'
pnpm i -g verdaccio
install the Verdaccio package registry proxypnpm dev
run Verdacciopnpm build
build and publish in Verdaccio locallypnpm t
run testspnpm pub
publish ./dist