8000 Bump to v4.0.1. · lodash/lodash@d8d0500 · GitHub
[go: up one dir, main page]

Skip to content

Commit d8d0500

Browse files
committed
Bump to v4.0.1.
1 parent 0646bac commit d8d0500

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+4476
-510
lines changed

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# lodash v4.0.0
1+
# lodash v4.0.1
22

33
The [lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules.
44

@@ -11,32 +11,34 @@ $ lodash -d -o ./lodash.js
1111
## Installation
1212

1313
Using npm:
14-
1514
```bash
1615
$ {sudo -H} npm i -g npm
1716
$ npm i --save lodash
1817
```
1918

2019
In Node.js:
21-
2220
```js
23-
// load the modern build
21+
// load the full build
2422
var _ = require('lodash');
23+
// load the core build
24+
var _ = require('lodash/core');
25+
// load the fp build
26+
var _ = require('lodash/fp');
2527
// or a method category
2628
var array = require('lodash/array');
2729
// or a method (great for smaller builds with browserify/webpack)
2830
var chunk = require('lodash/chunk');
2931
```
3032

31-
See the [package source](https://github.com/lodash/lodash/tree/4.0.0-npm) for more details.
33+
See the [package source](https://github.com/lodash/lodash/tree/4.0.1-npm) for more details.
3234

3335
**Note:**<br>
3436
Don’t assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL.<br>
3537
Install [n_](https://www.npmjs.com/package/n_) for a REPL that includes lodash by default.
3638

3739
## Module formats
3840

39-
lodash is also available in a variety of other builds & module formats.
41+
Lodash is also available in a variety of other builds & module formats.
4042

4143
* [lodash](https://www.npmjs.com/package/lodash) & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) packages
4244
* [lodash-amd](https://www.npmjs.com/package/lodash-amd)
@@ -52,5 +54,5 @@ lodash is also available in a variety of other builds & module formats.
5254

5355
## Support
5456

55-
Tested in Chrome 46-47, Firefox 42-43, IE 9-11, Edge 13, Safari 8-9, Node.js 0.10.x, 0.12.x, 4.x, & 5.x, &amp; PhantomJS 1.9.8.
57+
Tested in Chrome 46-47, Firefox 42-43, IE 9-11, Edge 13, Safari 8-9, Node.js 0.10.x, 0.12.x, 4.x, & 5.x, & PhantomJS 1.9.8.
5658
Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing.

assignInWith.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var copyObjectWith = require('./internal/copyObjectWith'),
2929
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
3030
* // => { 'a': 1, 'b': 2 }
3131
*/
32-
var assignInWith = createAssigner(function(object, source, customizer) {
32+
var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
3333
copyObjectWith(source, keysIn(source), object, customizer);
3434
});
3535

assignWith.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var copyObjectWith = require('./internal/copyObjectWith'),
2828
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
2929
* // => { 'a': 1, 'b': 2 }
3030
*/
31-
var assignWith = createAssigner(function(object, source, customizer) {
31+
var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
3232
copyObjectWith(source, keys(source), object, customizer);
3333
});
3434

cloneDeepWith.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var baseClone = require('./internal/baseClone');
1717
* }
1818
* }
1919
*
20-
* var el = _.cloneDeep(document.body, customizer);
20+
* var el = _.cloneDeepWith(document.body, customizer);
2121
*
2222
* console.log(el === document.body);
2323
* // => false

cloneWith.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var baseClone = require('./internal/baseClone');
44
* This method is like `_.clone` except that it accepts `customizer` which
55
* is invoked to produce the cloned value. If `customizer` returns `undefined`
66
* cloning is handled by the method instead. The `customizer` is invoked with
7-
* up to five arguments; (value [, index|key, object, stack]).
7+
* up to four arguments; (value [, index|key, object, stack]).
88
*
99
* @static
1010
* @memberOf _
@@ -20,7 +20,7 @@ var baseClone = require('./internal/baseClone');
2020
* }
2121
* }
2222
*
23-
* var el = _.clone(document.body, customizer);
23+
* var el = _.cloneWith(document.body, customizer);
2424
*
2525
* console.log(el === document.body);
2626
* // => false

concat.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ var arrayConcat = require('./internal/arrayConcat'),
2525
* // => [1]
2626
*/
2727
var concat = rest(function(array, values) {
28+
if (!isArray(array)) {
29+
array = array == null ? [] : [Object(array)];
30+
}
2831
values = baseFlatten(values);
29-
return arrayConcat(isArray(array) ? array : [Object(array)], values);
32+
return arrayConcat(array, values);
3033
});
3134

3235
module.exports = concat;

cond.js

Lines changed: 1 addition & 1 deletion
6876
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var FUNC_ERROR_TEXT = 'Expected a function';
2323
* [_.matches({ 'a': 1 }), _.constant('matches A')],
2424
* [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
2525
* [_.constant(true), _.constant('no match')]
26-
* ])
26+
* ]);
2727
*
2828
* func({ 'a': 1, 'b': 2 });
2929
* // => 'matches A'

0 commit comments

Comments
 (0)
0