Revert allowing _.omit and _.pick to work as a callback for _.map when combined with _.partialRight to be solved with _.partial placeholders in v3.

This commit is contained in:
John-David Dalton
2014-02-10 00:32:10 -08:00
parent de3d9dca72
commit dae0b25717
8 changed files with 71 additions and 157 deletions

View File

@@ -4313,16 +4313,9 @@
* // => { 'name': 'fred' }
*/
function omit(object, guard) {
var args = arguments,
result = {},
type = typeof guard;
if ((type == 'number' || type == 'string') && args[2] && args[2][guard] === object) {
args = slice(args);
splice.call(args, 1, 2);
}
var omitProps = baseFlatten(args, true, false, 1),
length = omitProps.length;
var omitProps = baseFlatten(arguments, true, false, 1),
length = omitProps.length,
result = {};
while (length--) {
omitProps[length] = String(omitProps[length]);
@@ -4397,16 +4390,9 @@
* });
* // => { 'name': 'fred' }
*/
function pick(object, guard) {
var args = arguments,
type = typeof guard;
if ((type == 'number' || type == 'string') && args[2] && args[2][guard] === object) {
args = slice(args);
splice.call(args, 1, 2);
}
function pick(object) {
var index = -1,
props = baseFlatten(args, true, false, 1),
props = baseFlatten(arguments, true, false, 1),
length = props.length,
result = {};