MCPcopy Index your code
hub / github.com/nodejs/node / pick

Function pick

deps/npm/test/lib/cli/exit-handler.js:16–19  ·  view source on GitHub ↗
(obj, ...keys)

Source from the content-addressed store, hash-verified

14const { version: NPM_VERSION } = require('../../../package.json')
15
16const pick = (obj, ...keys) => keys.reduce((acc, key) => {
17 acc[key] = obj[key]
18 return acc
19}, {})
20
21t.formatSnapshot = (obj) => {
22 if (Array.isArray(obj)) {

Callers 1

exit-handler.jsFile · 0.85

Calls 1

reduceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…