lodash: Remove unneeded slice call in pick. [jddalton, sindresorhus]

Former-commit-id: fbc5e2d918f31d2cd59bb9708c055c60592add10
This commit is contained in:
John-David Dalton
2012-04-25 14:22:32 -04:00
parent 23b8d083a4
commit a551992c3f
2 changed files with 20 additions and 19 deletions

View File

@@ -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) {