MCPcopy Index your code
hub / github.com/prettier/prettier / pick

Function pick

src/cli/utilities.js:40–43  ·  view source on GitHub ↗

* @template Obj * @template {keyof Obj} Keys * @param {Obj} object * @param {Array } keys * @returns {{[key in Keys]: Obj[key]}}

(object, keys)

Source from the content-addressed store, hash-verified

38 * @returns {{[key in Keys]: Obj[key]}}
39 */
40function pick(object, keys) {
41 const entries = keys.map((key) => [key, object[key]]);
42 return Object.fromEntries(entries);
43}
44
45/**
46 * @param {string} string

Callers 2

parseArgvFunction · 0.90
pick_and_omit.jsFile · 0.85

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…