Hyperse Pipeline

Installation

Install @hyperse/pipeline in your project.

Package install

npm install @hyperse/pipeline

Requirements

  • Node.js 16 or newer
  • TypeScript 4.5 or newer (for full type inference)

The package ships both ESM and type declarations:

package.json
{
  "exports": {
    ".": {
      "import": "./index.js",
      "types": "./dist/index.d.ts"
    }
  }
}

Verify the install

Import either paradigm and check that types resolve:

import { Pipeline, pipe } from '@hyperse/pipeline';

const engine = new Pipeline<{ ok: boolean }>();
const run = pipe(
  () => 1,
  (n) => n + 1
);

console.log(typeof engine.use, typeof run);

Optional integrations

The monad helpers are dependency-free, but to use monads you need the corresponding library installed:

npm install monet

Or, for fp-ts / purify-ts:

npm install fp-ts
import { Either, Maybe } from 'monet';

Next steps

On this page