1
- # Lo-Dash v1.3.1
2
-
1
+ # Lo-Dash v2.0.0
3
2
A utility library delivering consistency, [ customization] ( http://lodash.com/custom-builds ) , [ performance] ( http://lodash.com/benchmarks ) , & [ extras] ( http://lodash.com/#features ) .
4
3
5
4
## Download
6
5
7
6
* 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 )
10
9
11
10
* 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 )
14
13
15
14
* 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.
18
19
19
20
CDN copies are available on [ cdnjs] ( http://cdnjs.com/ ) & [ jsDelivr] ( http://www.jsdelivr.com/#!lodash ) .<br >
20
21
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
34
35
* [ _ .cloneDeep] ( http://lodash.com/docs#cloneDeep ) for deep cloning arrays & objects
35
36
* [ _ .contains] ( http://lodash.com/docs#contains ) accepts a ` fromIndex `
36
37
* [ _ .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
37
39
* [ _ .debounce] ( http://lodash.com/docs#debounce ) & [ _ .throttle] ( http://lodash.com/docs#throttle ) accept ` options ` for more control
38
40
* [ _ .findIndex] ( http://lodash.com/docs#findIndex ) & [ _ .findKey] ( http://lodash.com/docs#findKey ) for finding indexes & keys
39
41
* [ _ .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
44
46
* [ _ .merge] ( http://lodash.com/docs#merge ) for a deep [ _ .extend] ( http://lodash.com/docs#extend )
45
47
* [ _ .parseInt] ( http://lodash.com/docs#parseInt ) for consistent behavior
46
48
* [ _ .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
47
50
* [ _ .runInContext] ( http://lodash.com/docs#runInContext ) for easier mocking
48
51
* [ _ .support] ( http://lodash.com/docs#support ) for flagging environment features
49
52
* [ _ .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 )
50
53
* [ _ .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 )
52
54
* [ _ .where] ( http://lodash.com/docs#where ) supports deep object comparisons
55
+ * [ _ .zip] ( http://lodash.com/docs#zip ) is capable of unzipping values
53
56
* [ _ .omit] ( http://lodash.com/docs#omit ) , [ _ .pick] ( http://lodash.com/docs#pick ) , &
54
57
[ more] ( http://lodash.com/docs " _.assign, _.clone, _.cloneDeep, _.first, _.initial, _.isEqual, _.last, _.merge, _.rest ") accept callbacks
55
58
* [ _ .contains] ( http://lodash.com/docs#contains ) , [ _ .toArray] ( http://lodash.com/docs#toArray ) , &
56
59
[ 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
57
60
* [ _ .filter] ( http://lodash.com/docs#filter ) , [ _ .map] ( http://lodash.com/docs#map ) , &
58
61
[ 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
59
63
60
64
## Resources
61
65
62
66
* Posts
63
67
- [ 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/ )
64
69
65
70
* Videos
66
71
- [ Introduction] ( https://vimeo.com/44154599 )
@@ -72,7 +77,7 @@ For a list of upcoming features, check out our [roadmap](https://github.com/loda
72
77
73
78
## Support
74
79
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.
76
81
77
82
## Installation & usage
78
83
@@ -85,17 +90,17 @@ In browsers:
85
90
Using [ ` npm ` ] ( http://npmjs.org/ ) :
86
91
87
92
``` bash
88
- npm install lodash
93
+ npm i lodash
89
94
90
- npm install -g lodash
95
+ {sudo} npm i -g lodash
91
96
npm link lodash
92
97
```
93
98
94
99
In [ Node.js] ( http://nodejs.org/ ) & [ Ringo] ( http://ringojs.org/ ) :
95
100
96
101
``` js
97
102
var _ = require (' lodash' );
98
- // or as an Underscore replacement
103
+ // or as Underscore
99
104
var _ = require (' lodash/dist/lodash.underscore' );
100
105
```
101
106
@@ -114,21 +119,62 @@ In an AMD loader:
114
119
115
120
``` js
116
121
require ({
117
- ' paths' : { ' underscore' : ' path/to/lodash' }
122
+ ' packages' : [
123
+ { ' name' : ' lodash' , ' location' : ' path/to/lodash' , ' main' : ' lodash' }
124
+ ]
118
125
},
119
- [' underscore ' ], function (_ ) {
126
+ [' lodash ' ], function (_ ) {
120
127
console .log (_ .VERSION );
121
128
});
122
129
```
123
130
124
131
## Release Notes
125
132
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
132
178
133
179
The full changelog is available [ here] ( https://github.com/lodash/lodash/wiki/Changelog ) .
134
180
0 commit comments