Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/fun/mod.ts>optics.key

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Go to Latest
function optics.key
import { optics } from "https://deno.land/x/fun@v2.0.0-alpha.6/mod.ts";
const { key } = optics;

Given an optic over a record, focus on a value at a key in that record.

Parameters

key: string

Returns

<U extends Tag, S, A>(first: Optic<U, S, Readonly<Record<string, A>>>) => Optic<Align<U, AffineTag>, S, A>