Records

Plain objects as maps from keys to values, built and transformed without mutating the input.

import { RecordMap } from "@pdfking/tfunc"

RecordMap(price => price * 2, { tea: 3, cake: 5 }) // { tea: 6, cake: 10 }

@pdfking/structs has the checks to tell a record from anything else.