mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 18:37:50 +00:00
lodash: Remove unneeded slice call in pick. [jddalton, sindresorhus]
Former-commit-id: fbc5e2d918f31d2cd59bb9708c055c60592add10
This commit is contained in:
@@ -2231,11 +2231,12 @@
|
||||
*/
|
||||
function pick(object) {
|
||||
var prop,
|
||||
index = -1,
|
||||
props = concat.apply([], slice.call(arguments, 1)),
|
||||
index = 0,
|
||||
props = concat.apply([], arguments),
|
||||
length = props.length,
|
||||
result = {};
|
||||
|
||||
// start `index` at `1` to skip `object`
|
||||
while (++index < length) {
|
||||
prop = props[index];
|
||||
if (prop in object) {
|
||||
|
||||
Reference in New Issue
Block a user