Bump to v0.5.0-rc.1.

Former-commit-id: f5a29fd34de5aced3287413f40a0a36226465c84
This commit is contained in:
John-David Dalton
2012-08-07 00:23:44 -07:00
parent 0077580838
commit 7cd6ffec2a
6 changed files with 205 additions and 199 deletions

119
README.md
View File

@@ -1,4 +1,4 @@
# Lo-Dash <sup>v0.4.2</sup>
# Lo-Dash <sup>v0.5.0-rc.1</sup>
A drop-in replacement<sup>[*](https://github.com/bestiejs/lodash/wiki/Drop-in-Disclaimer)</sup> for Underscore.js, from the devs behind [jsPerf.com](http://jsperf.com), that delivers [performance improvements](http://lodash.com/benchmarks), [bug fixes](https://github.com/bestiejs/lodash#closed-underscorejs-issues), and [additional features](https://github.com/bestiejs/lodash#features).
@@ -6,8 +6,8 @@ Lo-Dashs performance is gained by avoiding slower native methods, instead opt
## Download
* [Development source](https://raw.github.com/bestiejs/lodash/v0.4.2/lodash.js)
* [Production source](https://raw.github.com/bestiejs/lodash/v0.4.2/lodash.min.js)
* [Development source](https://raw.github.com/bestiejs/lodash/v0.5.0-rc.1/lodash.js)
* [Production source](https://raw.github.com/bestiejs/lodash/v0.5.0-rc.1/lodash.min.js)
* CDN copies of ≤ [v0.4.2](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/0.4.2/lodash.min.js) are available on [cdnjs](http://cdnjs.com/) thanks to [CloudFlare](http://www.cloudflare.com/)
* For optimal performance, [create a custom build](https://github.com/bestiejs/lodash#custom-builds) with only the features you need
@@ -32,20 +32,26 @@ For more information check out these screencasts over Lo-Dash:
* AMD loader support ([RequireJS](http://requirejs.org/), [curl.js](https://github.com/cujojs/curl), etc.)
* [_.bind](http://lodash.com/docs#bind) supports *"lazy"* binding
* [_.clone](https://github.com/bestiejs/lodash/tree/master/doc#_clonevalue-deep--guard-thorough) supports *"deep"* cloning
* [_.countBy](https://github.com/bestiejs/lodash/tree/master/doc#_countbycollection-callback--thisarg) as a compainion function for [_.groupBy](http://lodash.com/docs#groupBy) and [_.sortBy](http://lodash.com/docs#sortBy)
* [_.debounce](http://lodash.com/docs#debounce)ed functions match [_.throttle](http://lodash.com/docs#throttle)ed functions return value behavior
* [_.forEach](http://lodash.com/docs#forEach) is chainable
* [_.drop](https://github.com/bestiejs/lodash/tree/master/doc#_dropobject--prop1-prop2-) for the inverse functionality of [_.pick](http://lodash.com/docs#pick)
* [_.forEach](http://lodash.com/docs#forEach) is chainable and supports exiting iteration early
* [_.forIn](http://lodash.com/docs#forIn) for iterating over an objects own and inherited properties
* [_.forOwn](http://lodash.com/docs#forOwn) for iterating over an objects own properties
* [_.groupBy](http://lodash.com/docs#groupBy), [_.sortedIndex](http://lodash.com/docs#sortedIndex), and [_.uniq](http://lodash.com/docs#uniq) accept a `thisArg` argument
* [_.indexOf](http://lodash.com/docs#indexOf) and [_.lastIndexOf](http://lodash.com/docs#lastIndexOf) accept a `fromIndex` argument
* [_.partial](http://lodash.com/docs#partial) for more functional fun
* [_.merge](https://github.com/bestiejs/lodash/tree/master/doc#_mergeobject--source1-source2--indicator) for a *"deep"* [_.extend](http://lodash.com/docs#extend)
* [_.partial](http://lodash.com/docs#partial) for partial application without `this` binding
* [_.template](http://lodash.com/docs#template) utilizes [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) for easier debugging
* [_.where](https://github.com/bestiejs/lodash/tree/master/doc#_wherecollection-properties) for filtering collections by contained properties
* [_.zipObject](http://lodash.com/docs#zipObject) for composing objects
* [_.contains](http://lodash.com/docs#contains), [_.size](http://lodash.com/docs#size), [_.toArray](http://lodash.com/docs#toArray),
[and more…](http://lodash.com/docs "_.every, _.filter, _.find, _.forEach, _.groupBy, _.invoke, _.map, _.pluck, _.reduce, _.reduceRight, _.reject, _.some, _sortBy") accept strings
## Support
Lo-Dash has been tested in at least Chrome 5-20, Firefox 1.5-13, IE 6-9, Opera 9.25-12, Safari 3.0.4-5.1.7, Node.js 0.4.8-0.8.2, Narwhal 0.3.2, RingoJS 0.8, and Rhino 1.7RC3.
Lo-Dash has been tested in at least Chrome 5-20, Firefox 1.5-13, IE 6-9, Opera 9.25-12.01, Safari 3.0.4-6, Node.js 0.4.8-0.8.2, Narwhal 0.3.2, RingoJS 0.8, and Rhino 1.7RC3.
## Custom builds
@@ -55,6 +61,11 @@ We handle all the method dependency and alias mapping for you.
* Backbone builds, containing all methods required by Backbone, may be created using the `backbone` modifier argument.
~~~ bash
lodash backbone
~~~
* CSP builds, supporting default Content Security Policy restrictions, may be created using the `csp` modifier argument.
~~~ bash
lodash csp
~~~
* Legacy builds, tailored for older browsers without [ES5 support](http://es5.github.com/), may be created using the `legacy` modifier argument.
@@ -70,6 +81,11 @@ lodash mobile
* Strict builds, with `_.bindAll`, `_.defaults`, and `_.extend` in [strict mode](http://es5.github.com/#C), may be created using the `strict` modifier argument.
~~~ bash
lodash strict
~~~
* Underscore builds, containing only methods included in Underscore, may be created using the `underscore` modifier argument.
~~~ bash
lodash underscore
~~~
Custom builds may be created in three ways:
@@ -93,11 +109,11 @@ lodash include=each,filter,map
lodash include="each, filter, map"
~~~
All arguments, except `exclude` with `include` and `legacy` with `mobile`, may be combined.
All arguments, except `backbone` with `underscore`, `exclude` with `include`, and `legacy` with `csp`/`mobile`, may be combined.
~~~ bash
lodash backbone legacy category=utilities exclude=first,last
lodash backbone mobile strict category=functions include=pick,uniq
lodash underscore mobile strict category=functions include=pick,uniq
~~~
The `lodash` command-line utility is available when Lo-Dash is installed as a global package (i.e. `npm install -g lodash`).
@@ -152,29 +168,33 @@ require({
## Closed Underscore.js issues <sup>(20+)</sup>
* Allow iteration of objects with a `length` property [[#148](https://github.com/documentcloud/underscore/issues/148), [#154](https://github.com/documentcloud/underscore/issues/154), [#252](https://github.com/documentcloud/underscore/issues/252), [#448](https://github.com/documentcloud/underscore/issues/448), [#659](https://github.com/documentcloud/underscore/issues/659), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L364-370)]
* Ensure array-like objects with invalid `length` properties are treated like regular objects [[test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L315-321), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L665-679), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L921-924)]
* Ensure *"Arrays"* methods allow falsey `array` arguments [[test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L989-1028)]
* Ensure *"Collections"* methods allow string `collection` arguments [[#247](https://github.com/documentcloud/underscore/issues/247), [#276](https://github.com/documentcloud/underscore/issues/276), [#561](https://github.com/documentcloud/underscore/pull/561), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L148-157), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L323-341), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L681-698), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L926-929)]
* Ensure templates compiled with errors are inspectable [[#666](https://github.com/documentcloud/underscore/issues/666), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L795-802)]
* Fix cross-browser object iteration bugs [[#60](https://github.com/documentcloud/underscore/issues/60), [#376](https://github.com/documentcloud/underscore/issues/376), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L224-236), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L375-400), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L496-507), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L515-517), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L535-555), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L725-727)]
* Allow iteration of objects with a `length` property [[#148](https://github.com/documentcloud/underscore/issues/148), [#154](https://github.com/documentcloud/underscore/issues/154), [#252](https://github.com/documentcloud/underscore/issues/252), [#448](https://github.com/documentcloud/underscore/issues/448), [#659](https://github.com/documentcloud/underscore/issues/659), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L540-546)]
* Ensure array-like objects with invalid `length` properties are treated like regular objects [[test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L491-497)]
* Ensure *"Arrays"* methods allow falsey `array` arguments [[test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L1412-1450)]
* Ensure *"Collections"* methods allow string `collection` arguments [[#247](https://github.com/documentcloud/underscore/issues/247), [#276](https://github.com/documentcloud/underscore/issues/276), [#561](https://github.com/documentcloud/underscore/pull/561), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L499-517)]
* Ensure templates compiled with errors are inspectable [[#666](https://github.com/documentcloud/underscore/issues/666), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L1157-1160)]
* Fix cross-browser object iteration bugs [[#60](https://github.com/documentcloud/underscore/issues/60), [#376](https://github.com/documentcloud/underscore/issues/376), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L551-576)]
* Handle arrays with `undefined` values correctly in IE < 9 [[#601](https://github.com/documentcloud/underscore/issues/601)]
* Methods should work on pages with incorrectly shimmed native methods [[#7](https://github.com/documentcloud/underscore/issues/7), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L96-102)]
* Register as an AMD module, but still export to global [[#431](https://github.com/documentcloud/underscore/pull/431), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L80-94)]
* `_(…)` should return passed wrapper instances [[test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L114-117)]
* `_.contains` should work with strings [[#667](https://github.com/documentcloud/underscore/pull/667), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L148-157)]
* `_.escape` should return an empty string when passed `null` or `undefined` [[#407](https://github.com/documentcloud/underscore/issues/427), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L205-208)]
* `_.forEach` should be chainable [[#142](https://github.com/documentcloud/underscore/issues/142), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L310-313)]
* `_.groupBy` should add values to own, not inherited, properties [[test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L415-422)]
* `_isNaN(new Number(NaN))` should return `true` [[test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L525-527)]
* `_.reduceRight` should pass correct callback arguments when iterating objects [[test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L649-663)]
* `_.size` should return the `length` of string values [[test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L708-710)]
* `_.size` shouldn't error on falsey values [[#650](https://github.com/documentcloud/underscore/pull/650), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L712-719)]
* `_.size` should work with `arguments` objects cross-browser [[#653](https://github.com/documentcloud/underscore/issues/653), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L721-723)]
* `_.sortedIndex` should support arrays with high `length` values [[test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L765-774)]
* `_.template` should not augment the `options` object [[test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L789-793)]
* `_.throttle` should work when called in a loop [[#502](https://github.com/documentcloud/underscore/issues/502), [test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L872-882)]
* `_.zipObject` should accept less than two arguments [[test](https://github.com/bestiejs/lodash/blob/v0.4.2/test/test.js#L951-953)]
* Methods should work on pages with incorrectly shimmed native methods [[#7](https://github.com/documentcloud/underscore/issues/7), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L117-123)]
* Register as an AMD module, but still export to global [[#431](https://github.com/documentcloud/underscore/pull/431), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L101-115)]
* `_(…)` should return passed wrapper instances [[test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L135-138)]
* `_.clone` should allow `deep` cloning [[#595](https://github.com/documentcloud/underscore/pull/595), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L197-212)]
* `_.contains` should work with strings [[#667](https://github.com/documentcloud/underscore/pull/667), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L267-276)]
* `_.escape` should return an empty string when passed `null` or `undefined` [[#407](https://github.com/documentcloud/underscore/issues/427), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L367-370)]
* `_.extend` should recursively extend objects [[#379](https://github.com/documentcloud/underscore/pull/379), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L851-873)]
* `_.forEach` should be chainable [[#142](https://github.com/documentcloud/underscore/issues/142), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L486-489)]
* `_.forEach` should exit iteration early [[#211](https://github.com/documentcloud/underscore/issues/211), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L578-597)]
* `_.groupBy` should add values to own, not inherited, properties [[test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L612-619)]
* `_.isNaN(new Number(NaN))` should return `true` [[test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L774-776)]
* `_.keys` and `_.size` should work with `arguments` objects cross-browser [[#396](https://github.com/documentcloud/underscore/issues/396), [#653](https://github.com/documentcloud/underscore/issues/653), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L786-788), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L1083-1085)]
* `_.range` should coerce arguments to numbers [[#634](https://github.com/documentcloud/underscore/issues/634), [#683](https://github.com/documentcloud/underscore/issues/683), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L996-999)]
* `_.reduceRight` should pass correct callback arguments when iterating objects [[test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L1007-1021)]
* `_.size` should return the `length` of string values [[test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L1066-1068)]
* `_.size` shouldn't error on falsey values [[#650](https://github.com/documentcloud/underscore/pull/650), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L1070-1077)]
* `_.sortedIndex` should support arrays with high `length` values [[test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L1127-1136)]
* `_.template` should not augment the `options` object [[test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L1151-1155)]
* `_.throttle` should work when called in a loop [[#502](https://github.com/documentcloud/underscore/issues/502), [test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L1247-1257)]
* `_.zipObject` should accept less than two arguments [[test](https://github.com/bestiejs/lodash/blob/v0.5.0-rc.1/test/test.js#L1374-1376)]
## Optimized methods <sup>(50+)</sup>
@@ -202,7 +222,6 @@ require({
* `_.isArguments`
* `_.isDate`
* `_.isEmpty`
* `_.isEqual`
* `_.isFinite`
* `_.isFunction`
* `_.isObject`
@@ -239,33 +258,19 @@ require({
## Release Notes
### <sup>v0.4.2</sup>
### <sup>v0.5.0-rc.1</sup>
* Added `strict` build
* Ensured `_.bindAll`, `_.defaults`, and `_.extend` avoid strict mode errors when attempting to augment read-only properties
* Optimized the iteration of large arrays in `_.difference`, `_.intersection`, and `_.without`
* Fixed build bugs related to removing variables
### <sup>v0.4.1</sup>
* Fixed `_.template` regression
* Optimized build process to detect and remove more unused variables
### <sup>v0.4.0</sup>
* Added `bin` and `scripts` entries to package.json
* Added `legacy` build option
* Added cross-browser support for passing strings to *"Collections"* methods
* Added `_.zipObject`
* Leveraged `_.indexOf`'s `fromIndex` in `_.difference` and `_.without`
* Optimized compiled templates
* Optimized inlining the `iteratorTemplate` for builds
* Optimized object iteration for *"Collections"* methods
* Optimized partially applied `_.bind` in V8
* Made compiled templates more debuggable
* Made `_.size` work with falsey values and consistent cross-browser with `arguments` objects
* Moved `_.groupBy` and `_.sortBy` back to the *"Collections"* category
* Removed `arguments` object from `_.range`
* Added `_.countBy`, `_.drop`, `_.merge`, and `_.where`
* Added `csp` *(Content Security Policy)* and `underscore` build options
* Added `deep` cloning support to `_.clone`
* Added support for exiting `_.forEach`, `_.forIn`, and `_.forOwn` early by returning `false` in the `callback`
* Ensured development build works with IE conditional compilation enabled
* Ensured `_.clone` doesn't clone functions, DOM nodes, `arguments` objects, and objects created by constructors other than `Object`
* Ensured `_.filter`s `callback` can't modify result values
* Ensured `_.isEmpty`, `_.isEquals`, and `_.size` support `arguments` objects
* Ensured `_.isEqual` doesn't inspect DOM nodes, works with objects from other documents, and calls custom `isEqual` methods before checking strict equality
* Ensured `reEvaluateDelimiter` is assigned when `_.templateSettings.evaluate` is undefined
* Made `_.range` coerce arguments to numbers
The full changelog is available [here](https://github.com/bestiejs/lodash/wiki/Changelog).