mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Bump to v4.7.0.
This commit is contained in:
14
omit.js
14
omit.js
@@ -1,15 +1,17 @@
|
||||
define(['./_arrayMap', './_baseDifference', './_baseFlatten', './_basePick', './keysIn', './rest'], function(arrayMap, baseDifference, baseFlatten, basePick, keysIn, rest) {
|
||||
define(['./_arrayMap', './_baseCastKey', './_baseDifference', './_baseFlatten', './_basePick', './_getAllKeysIn', './rest'], function(arrayMap, baseCastKey, baseDifference, baseFlatten, basePick, getAllKeysIn, rest) {
|
||||
|
||||
/**
|
||||
* The opposite of `_.pick`; this method creates an object composed of the
|
||||
* own and inherited enumerable properties of `object` that are not omitted.
|
||||
* own and inherited enumerable string keyed properties of `object` that are
|
||||
* not omitted.
|
||||
*
|
||||
* @static
|
||||
* @since 0.1.0
|
||||
* @memberOf _
|
||||
* @category Object
|
||||
* @param {Object} object The source object.
|
||||
* @param {...(string|string[])} [props] The property names to omit, specified
|
||||
* individually or in arrays.
|
||||
* @param {...(string|string[])} [props] The property identifiers to omit,
|
||||
* specified individually or in arrays.
|
||||
* @returns {Object} Returns the new object.
|
||||
* @example
|
||||
*
|
||||
@@ -22,8 +24,8 @@ define(['./_arrayMap', './_baseDifference', './_baseFlatten', './_basePick', './
|
||||
if (object == null) {
|
||||
return {};
|
||||
}
|
||||
props = arrayMap(baseFlatten(props, 1), String);
|
||||
return basePick(object, baseDifference(keysIn(object), props));
|
||||
props = arrayMap(baseFlatten(props, 1), baseCastKey);
|
||||
return basePick(object, baseDifference(getAllKeysIn(object), props));
|
||||
});
|
||||
|
||||
return omit;
|
||||
|
||||
Reference in New Issue
Block a user