Skip to content
Back to skills

Fp Pipe Ref

ASecurity

Quick reference for pipe and flow. Use when user needs to chain functions,

  • 6 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 10, 2026
testingtypescripttesting

Security analysis

A100/100

Scanned September 10, 2026

npx -y skills add JantonioFC/skillsbank --skill fp-pipe-ref --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Fp Pipe Ref?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Fp Pipe Ref
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jantoniofc-fp-pipe-ref/badge)](https://www.skillsdirectory.com/skills/jantoniofc-fp-pipe-ref)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: fp-pipe-ref
description: Quick reference for pipe and flow. Use when user needs to chain functions,
  compose operations, or build data pipelines in fp-ts.
version: 1.0.0
tags:
- fp-ts
- pipe
- flow
- composition
- quick-reference
risk: safe
source: community
license: MIT
---
# pipe & flow Quick Reference

## pipe - Transform a Value

```typescript
import { pipe } from 'fp-ts/function'

// pipe(startValue, fn1, fn2, fn3)
// = fn3(fn2(fn1(startValue)))

const result = pipe(
  '  hello world  ',
  s => s.trim(),
  s => s.toUpperCase(),
  s => s.split(' ')
)
// ['HELLO', 'WORLD']
```

## flow - Create Reusable Pipeline

```typescript
import { flow } from 'fp-ts/function'

// flow(fn1, fn2, fn3) returns a new function
const process = flow(
  (s: string) => s.trim(),
  s => s.toUpperCase(),
  s => s.split(' ')
)

process('  hello world  ') // ['HELLO', 'WORLD']
process('  foo bar  ')     // ['FOO', 'BAR']
```

## When to Use

| Use | When |
|-----|------|
| `pipe` | Transform a specific value now |
| `flow` | Create reusable transformation |

## With fp-ts Types

```typescript
import * as O from 'fp-ts/Option'
import * as A from 'fp-ts/Array'

// Option chain
pipe(
  O.fromNullable(user),
  O.map(u => u.email),
  O.getOrElse(() => 'no email')
)

// Array chain
pipe(
  users,
  A.filter(u => u.active),
  A.map(u => u.name)
)
```

## Common Pattern

```typescript
// Data last enables partial application
const getActiveNames = flow(
  A.filter((u: User) => u.active),
  A.map(u => u.name)
)

// Reuse anywhere
getActiveNames(users1)
getActiveNames(users2)
```

## Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.