fp-ts-std icon indicating copy to clipboard operation
fp-ts-std copied to clipboard

`Record.pick` & `Record.omit`

Open samhh opened this issue 3 years ago • 0 comments

Struct.omit now behaves more sensibly, however this leaves a space where a Record.omit should be. Record.pick should possibly be included too for symmetry?

omit :: Array string -> Record string a -> Record string a
export const omit = (xs: Array<string>): (<A>(y: Record<string, A>) => Record<string, A>) =>
  R.filterWithIndex(A.elemV(Str.Eq)(xs));

samhh avatar Sep 11 '22 15:09 samhh