mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Bump to v4.16.0.
This commit is contained in:
7
omit.js
7
omit.js
@@ -1,8 +1,7 @@
|
||||
import arrayMap from './_arrayMap.js';
|
||||
import baseDifference from './_baseDifference.js';
|
||||
import baseFlatten from './_baseFlatten.js';
|
||||
import basePick from './_basePick.js';
|
||||
import baseRest from './_baseRest.js';
|
||||
import flatRest from './_flatRest.js';
|
||||
import getAllKeysIn from './_getAllKeysIn.js';
|
||||
import toKey from './_toKey.js';
|
||||
|
||||
@@ -25,11 +24,11 @@ import toKey from './_toKey.js';
|
||||
* _.omit(object, ['a', 'c']);
|
||||
* // => { 'b': '2' }
|
||||
*/
|
||||
var omit = baseRest(function(object, props) {
|
||||
var omit = flatRest(function(object, props) {
|
||||
if (object == null) {
|
||||
return {};
|
||||
}
|
||||
props = arrayMap(baseFlatten(props, 1), toKey);
|
||||
props = arrayMap(props, toKey);
|
||||
return basePick(object, baseDifference(getAllKeysIn(object), props));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user