@pplnd/core exposes a single entry point. Everything is imported directly from the root package:
import { Arr, Maybe, pipe, Result, Task } from "@pplnd/core";
All modules are grouped into four logical domains:
Errors, Async & State
Discriminated unions for error handling, optional values, async execution, event streams, state, and optics.
Exports: Aborted Batcher Cache CircuitBreaker Combinable Deferred Equality EventBus Graph Lens Logged Machine Maybe Op Optional Ordering Pair Predicate RateLimiter Reader Refinement RemoteData Resource Result State Supervisor Task These Transaction Validation
Data & Collections
Pure curried utilities for arrays, records, dictionaries, strings, numbers, and JSON.
Exports: Arr BigNum Bool Dict Json Num Rec Str Uniq
Pipelines & Composition
Pipeline runners, flow composition, and execution control combinators.
Exports: converge curry flip flow flowAsync fn juxt memoize on pipe pipeAsync struct tap uncurry unless when
Domain Types
Primitives, compile-time branded types, duration units, and retry policies.
Exports: Brand Duration RetryPolicy
All entry points are published with "sideEffects": false and structured as static constant objects without class prototypes or closure side-effects. Modern bundlers (Vite, Rollup, webpack, esbuild, Next.js) automatically tree-shake unused functions and modules, bundling only the specific symbols imported by your application.
These measurements include each listed import and its dependencies, minified and gzipped:
| Import Pattern |
Minified + Gzipped |
pipe |
142 B |
flow |
173 B |
Brand |
27 B |
Duration |
150 B |
Maybe |
1.51 kB |
Result |
1.51 kB |
Validation |
1.51 kB |
RemoteData |
1.94 kB |
Machine |
2.04 kB |
EventBus |
1.23 kB |
Batcher |
3.07 kB |
Cache |
2.40 kB |
Resource |
2.05 kB |
Graph |
2.88 kB |
Task |
4.55 kB |
Transaction |
2.55 kB |
Op |
6.28 kB |
Lens |
233 B |
Arr |
6.51 kB |
Rec |
3.22 kB |
Dict |
2.41 kB |
Str |
2.30 kB |
- Node.js 18.0.0 or later (compatible with Bun, Deno, and modern browser environments)
- TypeScript 5.5 or later with
strict mode enabled
- Node.js Runtime Compatibility: Built-in runtime feature detection provides zero-dependency fallbacks for newer ECMAScript features (such as
Set.prototype.union and Array.prototype.toSorted), while Intl.Segmenter is loaded lazily for Str.graphemeSize, allowing @pplnd/core to run on Node.js 18+ and all modern JS runtimes.
- TypeScript 5.5+: Required because standard ECMAScript 2023 Array methods (
.toSorted(), .toReversed()) and ECMAScript 2024 Set methods (.union(), .intersection(), .isSubsetOf()) were introduced into TypeScript’s standard library (lib.es2023 / lib.es2024) in version 5.5.
- Strict Mode: Required for type-level guarantees — specifically exhaustiveness checking in
match pattern branches and narrowing in type guards.