keyed_lens 0.1.0 copy "keyed_lens: ^0.1.0" to clipboard
keyed_lens: ^0.1.0 copied to clipboard

Composable total and affine lenses for immutable aggregates, each carrying a stable, serializable FieldKey identity that addresses a field for reads, writes, diffs and patches.

0.1.0 #

Initial release.

  • FieldKey + sealed Segment (NameSegment / IdSegment) — stable, serializable field identity with a frozen toPath() / parse() wire codec. hashCode is cached (a key is immutable and used as a Map / Set key on every validation, touch check and error lookup); == early-outs on a hash mismatch.
  • Lens (total) / AffineLens (affine) with then / thenTotal composition; affine set / update no-op on a non-resolving path.
  • ListItemLens + .at(id, matches) — by-id list-row access.
  • Prism — minimal type-narrowing optic for sum types.
  • whenPresent(), Opt (Some / None), KeyedRow.
1
likes
160
points
52
downloads

Documentation

API reference

Publisher

verified publisherv4g.space

Weekly Downloads

Composable total and affine lenses for immutable aggregates, each carrying a stable, serializable FieldKey identity that addresses a field for reads, writes, diffs and patches.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

More

Packages that depend on keyed_lens