Skip to content

Reference

The Reference section documents every helper in Jane. Each page includes a clear description, the function signature, parameter tables, return shapes, examples, and notes. All helpers follow the same predictable structure so you can find what you need quickly.

Use this section when you already understand the concepts and workflows and need precise, implementation‑level details about a specific helper.

What’s included

Jane’s helpers are organized into several categories. Each category has its own index page and detailed entries for every function.

  • Type guards: Safe checks for types and shapes.
  • Normalizers: Pure functions that convert unknown input into predictable forms.
  • Validators: Boolean or result‑based checks for correctness.
  • Pipelines — Tools like pipe() for composing helpers.

Each category is intentionally small and focused.

Functional helpers

Composable, zero‑side‑effect helpers that enable expressive, pipeline‑driven transformations. Functional helpers never mutate input and never throw; they return values or Promises in a predictable, contract‑driven way. These helpers make it easy to build clear, intention‑revealing flows for normalization, validation, parsing, and domain logic.

Use these when you want to structure logic as a series of pure transformations, add observational steps, conditionally apply functions, or safely handle fallbacks without try/catch.

Learn more

Type guards

Helpers that check types and shapes without throwing.

Use these when you need safe branching logic or want to narrow unknown input before normalization or validation.

Learn more

Normalizers

Helpers that transform unknown or loosely‑typed input into well‑defined, predictable values.

Use these when you need to coerce external data into safe internal shapes before validation or business logic. Normalizers never throw and never mutate input; they always return a normalized value or a structured failure.

Learn more

Validators

Helpers that check whether a value satisfies a specific contract and return a structured ValidationResult<T>.

Use these when you need explicit success/failure reporting, detailed error messages, or when validating nested data structures. Validators never throw and never mutate input, making them ideal for user‑facing or API‑facing validation flows.

Learn more

Safe parsers

Helpers that attempt to convert unknown input into well‑defined, strongly‑typed values without ever throwing exceptions or mutating data. Safe parsers return a structured ParseResult<T> that makes success and failure explicit, predictable, and easy to handle.

Use these when you need to normalize external input into a specific type before validation or domain logic. Safe parsers never throw and never mutate input; they always return either a normalized value or a clear list of issues.

Learn more

Result helpers

Helpers that create, transform, and safely unwrap structured success/failure values. Result helpers never throw, never mutate input, and always make control flow explicit. They provide a predictable alternative to exceptions, enabling pipelines that are both expressive and defensive.

Learn more

Types

Lightweight utility types that describe the shapes, contracts, and result structures used throughout Jane.

Use these when you need to express normalized forms, validation outcomes, or structural guarantees at the type level without introducing runtime cost.

Learn more

How to read this section

Every helper is documented with the same predictable structure:

  • A short description.
  • The function signature.
  • A parameter table.
  • The return shape.
  • Examples.
  • Notes and edge cases.

All entries are self‑contained, deterministic, and free of side effects.

You can read them in any order.