mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 03:17:49 +00:00
Bump to v3.1.0.
This commit is contained in:
committed by
John-David Dalton
parent
f11f2385a6
commit
27d65e814a
@@ -1,5 +1,5 @@
|
||||
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/>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# lodash.pick v3.0.0
|
||||
# lodash.pick v3.1.0
|
||||
|
||||
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.
|
||||
|
||||
@@ -17,4 +17,4 @@ In Node.js/io.js:
|
||||
var pick = require('lodash.pick');
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
/**
|
||||
* 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
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
var baseFlatten = require('lodash._baseflatten'),
|
||||
bindCallback = require('lodash._bindcallback'),
|
||||
pickByArray = require('lodash._pickbyarray'),
|
||||
pickByCallback = require('lodash._pickbycallback');
|
||||
pickByCallback = require('lodash._pickbycallback'),
|
||||
restParam = require('lodash.restparam');
|
||||
|
||||
/**
|
||||
* Creates an object composed of the picked `object` properties. Property
|
||||
* names may be specified as individual arguments or as arrays of property
|
||||
* names. If `predicate` is provided it is invoked for each property of `object`
|
||||
* names. If `predicate` is provided it's invoked for each property of `object`
|
||||
* 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).
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -37,13 +38,13 @@ var baseFlatten = require('lodash._baseflatten'),
|
||||
* _.pick(object, _.isString);
|
||||
* // => { 'user': 'fred' }
|
||||
*/
|
||||
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;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "lodash.pick",
|
||||
"version": "3.0.0",
|
||||
"version": "3.1.0",
|
||||
"description": "The modern build of lodash’s `_.pick` as a module.",
|
||||
"homepage": "https://lodash.com/",
|
||||
"icon": "https://lodash.com/icon.svg",
|
||||
@@ -20,6 +20,7 @@
|
||||
"lodash._baseflatten": "^3.0.0",
|
||||
"lodash._bindcallback": "^3.0.0",
|
||||
"lodash._pickbyarray": "^3.0.0",
|
||||
"lodash._pickbycallback": "^3.0.0"
|
||||
"lodash._pickbycallback": "^3.0.0",
|
||||
"lodash.restparam": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user