Creates a new object composed of the picked object properties.
创建一个由所选对象属性组成的新对象。
The type of the source object / 源对象类型
The source object. 源对象
The keys to pick. 要选择的键
A new object with only the picked properties. 仅包含所选属性的新对象
An own __proto__ key is ignored, so untrusted input can neither replace the prototype of the result.
__proto__
源对象自有的 __proto__ 键会被忽略,避免不可信输入替换结果原型。
pick({ a: 1, b: 2 }, ['a']) // => { a: 1 } Copy
pick({ a: 1, b: 2 }, ['a']) // => { a: 1 }
Creates a new object composed of the picked object properties.
创建一个由所选对象属性组成的新对象。