PATH:
usr
/
local
/
lib
/
node_modules
/
bower
/
lib
/
node_modules
/
inquirer
/
node_modules
/
lodash
/
object
var arrayMap = require('../internal/arrayMap'), baseDifference = require('../internal/baseDifference'), baseFlatten = require('../internal/baseFlatten'), bindCallback = require('../internal/bindCallback'), keysIn = require('./keysIn'), pickByArray = require('../internal/pickByArray'), pickByCallback = require('../internal/pickByCallback'), restParam = require('../function/restParam'); /** * The opposite of `_.pick`; this method creates an object composed of the * own and inherited enumerable properties of `object` that are not omitted. * * @static * @memberOf _ * @category Object * @param {Object} object The source object. * @param {Function|...(string|string[])} [predicate] The function invoked per * iteration or property names to omit, specified as individual property * names or arrays of property names. * @param {*} [thisArg] The `this` binding of `predicate`. * @returns {Object} Returns the new object. * @example * * var object = { 'user': 'fred', 'age': 40 }; * * _.omit(object, 'age'); * // => { 'user': 'fred' } * * _.omit(object, _.isNumber); * // => { 'user': 'fred' } */ var omit = restParam(function(object, props) { if (object == null) { return {}; } if (typeof props[0] != 'function') { var props = arrayMap(baseFlatten(props), String); return pickByArray(object, baseDifference(keysIn(object), props)); } var predicate = bindCallback(props[0], props[1], 3); return pickByCallback(object, function(value, key, object) { return !predicate(value, key, object); }); }); module.exports = omit;
[-] functions.js
[edit]
[-] forOwn.js
[edit]
[-] omit.js
[edit]
[-] transform.js
[edit]
[-] forInRight.js
[edit]
[+]
..
[-] findKey.js
[edit]
[-] findLastKey.js
[edit]
[-] mapValues.js
[edit]
[-] valuesIn.js
[edit]
[-] forOwnRight.js
[edit]
[-] extend.js
[edit]
[-] has.js
[edit]
[-] keysIn.js
[edit]
[-] merge.js
[edit]
[-] pick.js
[edit]
[-] methods.js
[edit]
[-] get.js
[edit]
[-] values.js
[edit]
[-] pairs.js
[edit]
[-] forIn.js
[edit]
[-] mapKeys.js
[edit]
[-] defaultsDeep.js
[edit]
[-] invert.js
[edit]
[-] create.js
[edit]
[-] result.js
[edit]
[-] defaults.js
[edit]
[-] set.js
[edit]
[-] assign.js
[edit]
[-] keys.js
[edit]