Functional application framework for TypeScript. Zero dependencies. Errors as values. Immutability at runtime.
| Module | Description | Doc |
|---|---|---|
| Core | Result, Option, Validation, pipe, flow, Match, Eq, Ord, State, Lens, Prism, Traversal, Iso, LensOptional | core.md |
| Data | Record, List, NonEmptyList, HashMap, Schema, Codec, ADT, StableVec | data.md |
| Types | ErrType, Duration, Cron, Type (nominal) | types.md |
| Async | Task, Stream, Lazy, Env, Channel, Timer, Retry, CircuitBreaker, Semaphore, Mutex, RateLimiter, Cache, StateMachine, EventEmitter, Pool, Queue, CronRunner | async.md |
| IO | File, Command, Json, Crypto, Encoding, Compression, Clone, Url, Dns, Net, Client, Terminal, WebSocket, FFI | io.md |
| Runtime | Server, Program, Logger, Config, Os, Process, Path, Eol, Platform | runtime.md |
npm install @igorjs/pure-fximport { Ok, Err, pipe, Task, Schema, File } from '@igorjs/pure-fx'
// Or import specific modules for smaller bundles:
import { Ok, Err, pipe } from '@igorjs/pure-fx/core'
import { Schema, HashMap } from '@igorjs/pure-fx/data'
import { Task } from '@igorjs/pure-fx/async'
import { File, FFI } from '@igorjs/pure-fx/io'- Errors are values:
Result<T, E>instead of try/catch. Every fallible operation returns its error in the type. - Immutability at runtime: Records and Lists are deep-frozen. Mutations throw TypeError.
- Lazy async: Task and Stream describe computations. Nothing runs until
.run(). - Zero dependencies: Everything is built from scratch. No node_modules to audit.
- Multi-runtime: CI-tested on Node.js 22+, Bun, Cloudflare Workers, and Chromium.
- Batteries included: Full Web Crypto, FFI, Compression, DNS, TCP, subprocess, and more.
CI-tested on 6 environments:
| Runtime | Unit Tests | Integration Tests |
|---|---|---|
| Node.js 22 | 1462 | 337 (runtime + web) |
| Node.js 24 | - | 337 |
| Node.js 26 | - | 337 (with --allow-ffi) |
| Bun | - | 337 |
| CF Workers (miniflare) | - | 249 (web) |
| Chromium (Playwright) | - | 249 (web) |
Pure and web modules work everywhere. Runtime-dependent modules (File, Command, Os, Process, FFI) detect the runtime via globalThis and return Err/None in restricted environments. They never throw.
pnpm run lint # Biome lint + format
pnpm run check # Type check (tsgo)
pnpm run build # Build to dist/
pnpm test # Unit tests (pure-test)
pnpm run test:types # Type tests (compile-time safety)
node scripts/release.mjs minor # Bump, changelog, tag, push, GitHub releaseNext: Core