lodash.pick
Advanced tools
Comparing version 3.0.0 to 3.1.0
19
index.js
/** | ||
* lodash 3.0.0 (Custom Build) <https://lodash.com/> | ||
* lodash 3.1.0 (Custom Build) <https://lodash.com/> | ||
* Build: `lodash modern modularize exports="npm" -o ./` | ||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | ||
* Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE> | ||
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE> | ||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | ||
@@ -12,3 +12,4 @@ * Available under MIT license <https://lodash.com/license> | ||
pickByArray = require('lodash._pickbyarray'), | ||
pickByCallback = require('lodash._pickbycallback'); | ||
pickByCallback = require('lodash._pickbycallback'), | ||
restParam = require('lodash.restparam'); | ||
@@ -20,3 +21,3 @@ /** | ||
* picking the properties `predicate` returns truthy for. The predicate is | ||
* bound to `thisArg` and invoked with three arguments; (value, key, object). | ||
* bound to `thisArg` and invoked with three arguments: (value, key, object). | ||
* | ||
@@ -42,11 +43,11 @@ * @static | ||
*/ | ||
function pick(object, predicate, thisArg) { | ||
var pick = restParam(function(object, props) { | ||
if (object == null) { | ||
return {}; | ||
} | ||
return typeof predicate == 'function' | ||
? pickByCallback(object, bindCallback(predicate, thisArg, 3)) | ||
: pickByArray(object, baseFlatten(arguments, false, false, 1)); | ||
} | ||
return typeof props[0] == 'function' | ||
? pickByCallback(object, bindCallback(props[0], props[1], 3)) | ||
: pickByArray(object, baseFlatten(props)); | ||
}); | ||
module.exports = pick; |
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> | ||
Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas, | ||
Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, | ||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> | ||
@@ -4,0 +4,0 @@ |
{ | ||
"name": "lodash.pick", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "The modern build of lodash’s `_.pick` as a module.", | ||
@@ -23,4 +23,5 @@ "homepage": "https://lodash.com/", | ||
"lodash._pickbyarray": "^3.0.0", | ||
"lodash._pickbycallback": "^3.0.0" | ||
"lodash._pickbycallback": "^3.0.0", | ||
"lodash.restparam": "^3.0.0" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# lodash.pick v3.0.0 | ||
# lodash.pick v3.1.0 | ||
@@ -20,2 +20,2 @@ The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.pick` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. | ||
See the [documentation](https://lodash.com/docs#pick) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.pick) for more details. | ||
See the [documentation](https://lodash.com/docs#pick) or [package source](https://github.com/lodash/lodash/blob/3.1.0-npm-packages/lodash.pick) for more details. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4771
48
5
+ Addedlodash.restparam@^3.0.0
+ Addedlodash.restparam@3.6.1(transitive)