Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/froebel/pick.ts>default

A strictly typed utility library.
Go to Latest
variable default
import { default } from "https://deno.land/x/froebel@v0.18.0/pick.ts";

From obj, create a new object that only includes keys.

Examples

Example 1

pick({ a: 1, b: 2, c: 3 }, 'a', 'c') // { a: 1, c: 3 }

type

<T, K extends keyof T>(obj: T, ...keys: K[]) => Pick<T, K>