8000 Bump to v2.0.0. · lodash/lodash@d8dbcef · GitHub
[go: up one dir, main page]

Skip to content

Commit d8dbcef

Browse files
committed
Bump to v2.0.0.
1 parent 5d6a659 commit d8dbcef

11 files changed

+201
-155
lines changed

README.md

Lines changed: 67 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
# Lo-Dash v1.3.1
2-
1+
# Lo-Dash v2.0.0
32
A utility library delivering consistency, [customization](http://lodash.com/custom-builds), [performance](http://lodash.com/benchmarks), & [extras](http://lodash.com/#features).
43

54
## Download
65

76
* Modern builds:
8-
[Development](https://raw.github.com/lodash/lodash/1.3.1/dist/lodash.js) &
9-
[Production](https://raw.github.com/lodash/lodash/1.3.1/dist/lodash.min.js)
7+
[Development](https://raw.github.com/lodash/lodash/2.0.0/dist/lodash.js) &
8+
[Production](https://raw.github.com/lodash/lodash/2.0.0/dist/lodash.min.js)
109

1110
* Compatibility builds:
12-
[Development](https://raw.github.com/lodash/lodash/1.3.1/dist/lodash.compat.js) &
13-
[Production](https://raw.github.com/lodash/lodash/1.3.1/dist/lodash.compat.min.js)
11+
[Development](https://raw.github.com/lodash/lodash/2.0.0/dist/lodash.compat.js) &
12+
[Production](https://raw.github.com/lodash/lodash/2.0.0/dist/lodash.compat.min.js)
1413

1514
* Underscore builds:
16-
[Development](https://raw.github.com/lodash/lodash/1.3.1/dist/lodash.underscore.js) &
17-
[Production](https://raw.github.com/lodash/lodash/1.3.1/dist/lodash.underscore.min.js)
15+
[Development](https://raw.github.com/lodash/lodash/2.0.0/dist/lodash.underscore.js) &
16+
[Production](https://raw.github.com/lodash/lodash/2.0.0/dist/lodash.underscore.min.js)
17+
18+
Love modules? We’ve got you covered with [lodash-amd](https://npmjs.org/package/lodash-amd), [lodash-node](https://npmjs.org/package/lodash-node), and [npm packages](https://npmjs.org/~jdalton) per method.
1819

1920
CDN copies are available on [cdnjs](http://cdnjs.com/) & [jsDelivr](http://www.jsdelivr.com/#!lodash).<br>
2021
For smaller file sizes, create [custom builds](http://lodash.com/custom-builds) with only the features needed.
@@ -34,6 +35,7 @@ For a list of upcoming features, check out our [roadmap](https://github.com/loda
3435
* [_.cloneDeep](http://lodash.com/docs#cloneDeep) for deep cloning arrays & objects
3536
* [_.contains](http://lodash.com/docs#contains) accepts a `fromIndex`
3637
* [_.createCallback](http://lodash.com/docs#createCallback) for extending callbacks in methods & mixins
38+
* [_.curry](http://lodash.com/docs#curry) for creating [curried](http://hughfdjackson.com/javascript/2013/07/06/why-curry-helps/) functions
3739
* [_.debounce](http://lodash.com/docs#debounce) & [_.throttle](http://lodash.com/docs#throttle) accept `options` for more control
3840
* [_.findIndex](http://lodash.com/docs#findIndex) & [_.findKey](http://lodash.com/docs#findKey) for finding indexes & keys
3941
* [_.forEach](http://lodash.com/docs#forEach) is chainable & supports exiting early
@@ -44,23 +46,26 @@ For a list of upcoming features, check out our [roadmap](https://github.com/loda
4446
* [_.merge](http://lodash.com/docs#merge) for a deep [_.extend](http://lodash.com/docs#extend)
4547
* [_.parseInt](http://lodash.com/docs#parseInt) for consistent behavior
4648
* [_.partialRight](http://lodash.com/docs#partialRight) for [partial application](http://lodash.com/docs#partial) from the right
49+
* [_.pull](http://lodash.com/docs#pull) and [_.remove](http://lodash.com/docs#remove) for mutating arrays
4750
* [_.runInContext](http://lodash.com/docs#runInContext) for easier mocking
4851
* [_.support](http://lodash.com/docs#support) for flagging environment features
4952
* [_.template](http://lodash.com/docs#template) supports [*“imports”*](http://lodash.com/docs#templateSettings_imports) options & [ES6 template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6)
5053
* [_.transform](http://lodash.com/docs#transform) as a powerful alternative to [_.reduce](http://lodash.com/docs#reduce) for transforming objects
51-
* [_.unzip](http://lodash.com/docs#unzip) as the inverse of [_.zip](http://lodash.com/docs#zip)
5254
* [_.where](http://lodash.com/docs#where) supports deep object comparisons
55+
* [_.zip](http://lodash.com/docs#zip) is capable of unzipping values
5356
* [_.omit](http://lodash.com/docs#omit), [_.pick](http://lodash.com/docs#pick), &
5457
[more](http://lodash.com/docs "_.assign, _.clone, _.cloneDeep, _.first, _.initial, _.isEqual, _.last, _.merge, _.rest") accept callbacks
5558
* [_.contains](http://lodash.com/docs#contains), [_.toArray](http://lodash.com/docs#toArray), &
5659
[more](http://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.forEach, _.forEachRight, _.groupBy, _.invoke, _.map, _.max, _.min, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.where") accept strings
5760
* [_.filter](http://lodash.com/docs#filter), [_.map](http://lodash.com/docs#map), &
5861
[more](http://lodash.com/docs "_.countBy, _.every, _.find, _.findKey, _.findLast, _.findLastIndex, _.findLastKey, _.first, _.groupBy, _.initial, _.last, _.max, _.min, _.reject, _.rest, _.some, _.sortBy, _.sortedIndex, _.uniq") support *_.pluck”* & *_.where”* shorthands
62+
* [_.findLast](http://lodash.com/docs#findLast), [_.findLastIndex](http://lodash.com/docs#findLastIndex), & [more](http://lodash.com/docs "_.findLastKey, _.forEachRight, _.forInRight, _.forOwnRight") right-associative methods
5963

6064
## Resources
6165

6266
* Posts
6367
- [Say “Hello” to Lo-Dash](http://kitcambridge.be/blog/say-hello-to-lo-dash/)
68+
- [Custom builds in Lo-Dash 2.0](http://kitcambridge.be/blog/custom-builds-in-lo-dash-2-dot-0/)
6469

6570
* Videos
6671
- [Introduction](https://vimeo.com/44154599)
@@ -72,7 +77,7 @@ For a list of upcoming features, check out our [roadmap](https://github.com/loda
7277

7378
## Support
7479

75-
Tested in Chrome 5~28, Firefox 2~22, IE 6-10, Opera 9.25~15, Safari 3-6, Node.js 0.4.8-0.10.15, Narwhal 0.3.2, PhantomJS 1.9.1, RingoJS 0.9, & Rhino 1.7RC5.
80+
Tested in Chrome 5~29, Firefox 2~23, IE 6-10, Opera 9.25~15, Safari 3-6, Node.js 0.6.8-0.10.18, Narwhal 0.3.2, PhantomJS 1.9.1, RingoJS 0.9, & Rhino 1.7RC5.
7681

7782
## Installation & usage
7883

@@ -85,17 +90,17 @@ In browsers:
8590
Using [`npm`](http://npmjs.org/):
8691

8792
```bash
88-
npm install lodash
93+
npm i lodash
8994

90-
npm install -g lodash
95+
{sudo} npm i -g lodash
9196
npm link lodash
9297
```
9398

9499
In [Node.js](http://nodejs.org/) & [Ringo](http://ringojs.org/):
95100

96101
```js
97102
var _ = require('lodash');
98-
// or as an Underscore replacement
103+
// or as Underscore
99104
var _ = require('lodash/dist/lodash.underscore');
100105
```
101106

@@ -114,21 +119,62 @@ In an AMD loader:
114119

115120
```js
116121
require({
117-
'paths': { 'underscore': 'path/to/lodash' }
122+
'packages': [
123+
{ 'name': 'lodash', 'location': 'path/to/lodash', 'main': 'lodash' }
124+
]
118125
},
119-
['underscore'], function(_) {
126+
['lodash'], function(_) {
120127
console.log(_.VERSION);
121128
});
122129
```
123130

124131
## Release Notes
125132

126-
### <sup>v1.3.1</sup>
127-
128-
* Added missing `cache` property to the objects returned by `getObject`
129-
* Ensured `maxWait` unit tests pass in Ringo
130-
* Increased the `maxPoolSize` value
131-
* Optimized `releaseArray` & `releaseObject`
133+
### <sup>v2.0.0</sup>
134+
135+
#### Compatibility Warnings
136+
137+
* Aligned `_.after` with Underscore 1.5.0, making it always return a function
138+
139+
#### Noteable Changes
140+
141+
* Created Lo-Dash methods as `npm` packages & AMD/Node.js modules
142+
* Made `_.chain` force chaining for all methods, even those that normally return unwrapped values
143+
* Moved the build utility to [lodash-cli](https://npmjs.org/package/lodash-cli)
144+
* Optimized `_.contains`, `_.debounce`, `_.isArguments`, `_.throttle`, `_.where`,<br>
145+
& functions created by `_.bind`, `_.bindKey`, `_.curry`, `_.partial`, & `_.partialRight`
146+
* Added [`_.curry`](http://lodash.com/docs#curry), [`_.forEachRight`](http://lodash.com/docs#forEachRight),
147+
[`_.indexBy`](http://lodash.com/docs#indexBy), [`_.findLast`](http://lodash.com/docs#findLast),
148+
[`_.findLastIndex`](http://lodash.com/docs#findLastIndex),<br>
149+
[`_.findLastKey`](http://lodash.com/docs#findLastKey), [`_.forInRight`](http://lodash.com/docs#forInRight),
150+
[`_.forOwnRight`](http://lodash.com/docs#forOwnRight), [`_.pull`](http://lodash.com/docs#pull),
151+
[`_.remove`](http://lodash.com/docs#remove), & [`_.sample`](http://lodash.com/docs#sample)
152+
153+
#### Other Changes
154+
155+
* Added Curl & Dojo module loaders to the unit tests
156+
* Added the `modularize` build option
157+
* Added support for the `iife` command to be used without an `%output%` token
158+
* Added support for `_.mixin` to accept a destination object
159+
* Added support for `_.range` to accept a `step` of `0`
160+
* Added `_.eachRight` as an alias for `_.forEachRight`
161+
* Ensured *“Arrays”* methods support `arguments` objects
162+
* Ensured *“Functions”* methods throw when not passed functions
163+
* Ensured `_.at` works as a `callback` for `_.map`
164+
* Ensured `_.createCallback` works when no `argCount` is specified
165+
* Ensured `_.first` & `_.last` return arrays when passed a falsey `array` with an `n` value
166+
* Ensured `_.flatten` works with `arguments` objects
167+
* Ensured minified files work with Dojo’s builder
168+
* Ensured `_.zipObject` skips falsey elements
169+
* Improved dead code removal from builds
170+
* Improved JSDoc syntax
171+
* Made `_.memoize` avoid prefixing `cache` keys when using a `resolver` function
172+
* Made `_.unzip` an alias of `_.zip`
173+
* Removed local `clearTimeout` & `setTimeout` variables from the `underscore` build
174+
* Reduced the size of the repo & `npm` package
175+
* Simplified the bailout in `createCache`
176+
* Updated sourceURL & sourceMappingURL syntax
177+
* Updated `underscore` build compatibility to v1.5.2
132178

133179
The full changelog is available [here](https://github.com/lodash/lodash/wiki/Changelog).
134180

dist/lodash.compat.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Lo-Dash 1.3.1 (Custom Build) <http://lodash.com/>
3+
* Lo-Dash 2.0.0 (Custom Build) <http://lodash.com/>
44
* Build: `lodash -o ./dist/lodash.compat.js`
55
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
66
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
@@ -6542,7 +6542,7 @@
65426542
* @memberOf _
65436543
* @type string
65446544
*/
6545-
lodash.VERSION = '1.3.1';
6545+
lodash.VERSION = '2.0.0';
65466546

65476547
// add "Chaining" functions to the wrapper
65486548
lodash.prototype.chain = wrapperChain;

dist/lodash.compat.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lodash.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Lo-Dash 1.3.1 (Custom Build) <http://lodash.com/>
3+
* Lo-Dash 2.0.0 (Custom Build) <http://lodash.com/>
44
* Build: `lodash modern -o ./dist/lodash.js`
55
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
66
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
@@ -6196,7 +6196,7 @@
61966196
* @memberOf _
61976197
* @type string
61986198
*/
6199-
lodash.VERSION = '1.3.1';
6199+
lodash.VERSION = '2.0.0';
62006200

62016201
// add "Chaining" functions to the wrapper
62026202
lodash.prototype.chain = wrapperChain;

0 commit comments

Comments
 (0)
0