From cb9e044cb3ed09e5db528bd56e2b75f7a6327b69 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sat, 15 Dec 2012 17:34:03 -0800 Subject: [PATCH] Prepare v1.0.0-rc.3 bump. Former-commit-id: d4b08cd58a7effb9e6107fe16c11ccdea032cb00 --- README.md | 46 ++++++++++++++------- doc/README.md | 76 +++++++++++++++++------------------ doc/parse.php | 2 +- lodash.js | 4 +- lodash.min.js | 16 ++++---- lodash.underscore.js | 12 +++--- lodash.underscore.min.js | 10 ++--- package.json | 2 +- vendor/backbone/backbone.js | 6 +-- vendor/backbone/test/model.js | 7 +++- 10 files changed, 101 insertions(+), 80 deletions(-) diff --git a/README.md b/README.md index eba823b9d..a1e5a09bd 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Lo-Dash v1.0.0-rc.2 +# Lo-Dash v1.0.0-rc.3 [![build status](https://secure.travis-ci.org/bestiejs/lodash.png)](http://travis-ci.org/bestiejs/lodash) An alternative to Underscore.js, delivering [consistency](https://github.com/bestiejs/lodash#resolved-underscorejs-issues), [customization](https://github.com/bestiejs/lodash#custom-builds), [performance](http://lodash.com/benchmarks), and [extra features](https://github.com/bestiejs/lodash#features). @@ -6,18 +6,18 @@ An alternative to Underscore.js, delivering [consistency](https://github.com/bes ## Download * Lo-Dash builds:
-[Development](https://raw.github.com/bestiejs/lodash/v1.0.0-rc.2/lodash.js) and -[Production](https://raw.github.com/bestiejs/lodash/v1.0.0-rc.2/lodash.min.js) +[Development](https://raw.github.com/bestiejs/lodash/v1.0.0-rc.3/lodash.js) and +[Production](https://raw.github.com/bestiejs/lodash/v1.0.0-rc.3/lodash.min.js) * Underscore compatibility builds:
-[Development](https://raw.github.com/bestiejs/lodash/v1.0.0-rc.2/lodash.underscore.js) and -[Production](https://raw.github.com/bestiejs/lodash/v1.0.0-rc.2/lodash.underscore.min.js) +[Development](https://raw.github.com/bestiejs/lodash/v1.0.0-rc.3/lodash.underscore.js) and +[Production](https://raw.github.com/bestiejs/lodash/v1.0.0-rc.3/lodash.underscore.min.js) -* CDN copies of ≤ v1.0.0-rc.2’s builds are available on [cdnjs](http://cdnjs.com/) thanks to [CloudFlare](http://www.cloudflare.com/):
-[Lo-Dash dev](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.0-rc.2/lodash.js), -[Lo-Dash prod](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.0-rc.2/lodash.min.js), -[Underscore compat-dev](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.0-rc.2/lodash.underscore.js), and -[Underscore compat-prod](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.0-rc.2/lodash.underscore.min.js) +* CDN copies of ≤ v1.0.0-rc.3’s builds are available on [cdnjs](http://cdnjs.com/) thanks to [CloudFlare](http://www.cloudflare.com/):
+[Lo-Dash dev](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.0-rc.3/lodash.js), +[Lo-Dash prod](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.0-rc.3/lodash.min.js), +[Underscore compat-dev](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.0-rc.3/lodash.underscore.js), and +[Underscore compat-prod](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.0-rc.3/lodash.underscore.min.js) * For optimal file size, [create a custom build](https://github.com/bestiejs/lodash#custom-builds) with only the features you need @@ -43,7 +43,7 @@ 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.) * [_(…)](http://lodash.com/docs#_) supports intuitive chaining without calling [_(…).chain](http://lodash.com/docs#prototype_chain) * [_.bindKey](http://lodash.com/docs#bindKey) for binding [*“lazy”* defined](http://michaux.ca/articles/lazy-function-definition-pattern) methods - * [_.clone](http://lodash.com/docs#clone) supports *“deep”* cloning + * [_.cloneDeep](http://lodash.com/docs#cloneDeep) for *“deep”* cloning arrays and objects * [_.contains](http://lodash.com/docs#contains) accepts a `fromIndex` argument * [_.forEach](http://lodash.com/docs#forEach) is chainable and supports exiting iteration early * [_.forIn](http://lodash.com/docs#forIn) for iterating over an object’s own and inherited properties @@ -231,14 +231,30 @@ require({ * Methods should work on pages with incorrectly shimmed native methods [[#7](https://github.com/documentcloud/underscore/issues/7), [#742](https://github.com/documentcloud/underscore/issues/742), [test](https://github.com/bestiejs/lodash/blob/v1.0.0-rc.3/test/test.js#L140-L146)] * `_.isEmpty` should support jQuery/MooTools DOM query collections [[#690](https://github.com/documentcloud/underscore/pull/690), [test](https://github.com/bestiejs/lodash/blob/v1.0.0-rc.3/test/test.js#L807-L812)] * `_.isObject` should avoid V8 bug [#2291](http://code.google.com/p/v8/issues/detail?id=2291) [[#605](https://github.com/documentcloud/underscore/issues/605), [test](https://github.com/bestiejs/lodash/blob/v1.0.0-rc.3/test/test.js#L888-L900)] - * `_.keys` should work with `arguments` objects cross-browser [[#396](https://github.com/documentcloud/underscore/issues/396), [test](https://github.com/bestiejs/lodash/blob/v1.0.0-rc.3/test/test.js#L981-L983)] - * `_.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/v1.0.0-rc.3/test/test.js#L1382-L1385)] + * `_.keys` should work with `arguments` objects cross-browser [[#396](https://github.com/documentcloud/underscore/issues/396), [test](https://github.com/bestiejs/lodash/blob/v1.0.0-rc.3/test/test.js#L982-L984)] + * `_.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/v1.0.0-rc.3/test/test.js#L1383-L1386)] ## Release Notes ### v1.0.0-rc.3 - * +#### Compatibility Warnings + + * Made `_#join', '_#pop', and '_#shift' wrapper methods return unwrapped values + * Made *“Functions”* methods wrapper counterparts return wrapped values + * Removed `_.chain` and `_#chain` methods + +#### Changes + + * Added [_.cloneDeep](http://lodash.com/docs#cloneDeep) alias of `_.clone(…, true)` + * Added `_.once` to the `backbone` build method dependencies + * Ensured `backbone` builds implement Underscore’s chaining behavior + * Ensured the `settings=…` build option doesn’t clobber the default `moduleId` + * Ensured Lo-Dash’s `npm` package installation avoids erroring when no other modules have been globally installed + * Made compiled templates loaded via AMD use the Lo-Dash module for their `_` references + * Removed the *“Collections”* method `_.forEach` dependency from *“Arrays”* method `_.intersection` + * Optimized `_.isArray` and `_.isFunction` fallbacks as well as
+ `_.intersection`, `_.isDate`, `_.isRegExp`, `_.reduce`, `_.reduceRight`, `_.union`, and `_.uniq` ### v1.0.0-rc.2 @@ -249,7 +265,7 @@ require({ #### Compatibility Warnings - * Made `_(…)` chain automatically without needing to call `_#chain` + * Made `_(…)` intuitively chain without needing to call `_#chain` * Made `_.isEqual` equate `arguments` objects to similar `Object` objects * Made `_.clone` copy the enumerable properties of `arguments` objects and objects
created by constructors other than `Object` are cloned to plain `Object` objects diff --git a/doc/README.md b/doc/README.md index dcb77e013..08f9da9a6 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,4 +1,4 @@ -# Lo-Dash v1.0.0-rc.2 +# Lo-Dash v1.0.0-rc.3 @@ -372,7 +372,7 @@ _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]); ### `_.last(array [, n])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2959 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2960 "View in source") [Ⓣ][1] Gets the last element of the `array`. Pass `n` to return the last `n` elements of the `array`. @@ -397,7 +397,7 @@ _.last([3, 2, 1]); ### `_.lastIndexOf(array, value [, fromIndex=array.length-1])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2986 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2987 "View in source") [Ⓣ][1] Gets the index at which the last occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the offset from the end of the collection. @@ -426,7 +426,7 @@ _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3); ### `_.object(keys [, values=[]])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3016 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3017 "View in source") [Ⓣ][1] Creates an object composed from arrays of `keys` and `values`. Pass either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]`, or two arrays, one of `keys` and one of corresponding `values`. @@ -451,7 +451,7 @@ _.object(['moe', 'larry', 'curly'], [30, 40, 50]); ### `_.range([start=0], end [, step=1])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3061 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3062 "View in source") [Ⓣ][1] Creates an array of numbers *(positive and/or negative)* progressing from `start` up to but not including `stop`. This method is a port of Python's `range()` function. See http://docs.python.org/library/functions.html#range. @@ -489,7 +489,7 @@ _.range(0); ### `_.rest(array [, n=1])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3100 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3101 "View in source") [Ⓣ][1] The opposite of `_.initial`, this method gets all but the first value of `array`. Pass `n` to exclude the first `n` values from the result. @@ -517,7 +517,7 @@ _.rest([3, 2, 1]); ### `_.sortedIndex(array, value [, callback=identity|property, thisArg])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3144 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3145 "View in source") [Ⓣ][1] Uses a binary search to determine the smallest index at which the `value` should be inserted into `array` in order to maintain the sort order of the sorted `array`. If `callback` is passed, it will be executed for `value` and each element in `array` to compute their sort ranking. The `callback` is bound to `thisArg` and invoked with one argument; *(value)*. The `callback` argument may also be the name of a property to order by. @@ -561,7 +561,7 @@ _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { ### `_.union([array1, array2, ...])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3176 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3177 "View in source") [Ⓣ][1] Computes the union of the passed-in arrays using strict equality for comparisons, i.e. `===`. @@ -585,7 +585,7 @@ _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]); ### `_.uniq(array [, isSorted=false, callback=identity, thisArg])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3210 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3211 "View in source") [Ⓣ][1] Creates a duplicate-value-free version of the `array` using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `isSorted` will run a faster algorithm. If `callback` is passed, each element of `array` is passed through a callback` before uniqueness is computed. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*. @@ -624,7 +624,7 @@ _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return this.floor(num); }, Math); ### `_.without(array [, value1, value2, ...])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3268 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3270 "View in source") [Ⓣ][1] Creates an array with all occurrences of the passed values removed using strict equality for comparisons, i.e. `===`. @@ -649,7 +649,7 @@ _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); ### `_.zip([array1, array2, ...])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3299 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3301 "View in source") [Ⓣ][1] Groups the elements of each array at their corresponding indexes. Useful for separate data sources that are coordinated through matching array indexes. For a matrix of nested arrays, `_.zip.apply(...)` can transpose the matrix in a similar fashion. @@ -698,7 +698,7 @@ Creates a `lodash` object, that wraps the given `value`, to enable method chaini ### `_.tap(value, interceptor)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4166 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4168 "View in source") [Ⓣ][1] Invokes `interceptor` with the `value` as the first argument, and then returns `value`. The purpose of this method is to "tap into" a method chain, in order to perform operations on intermediate results within the chain. @@ -728,7 +728,7 @@ _.chain([1, 2, 3, 200]) ### `_.prototype.toString()` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4183 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4185 "View in source") [Ⓣ][1] Produces the `toString` result of the wrapped value. @@ -749,7 +749,7 @@ _([1, 2, 3]).toString(); ### `_.prototype.valueOf()` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4200 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4202 "View in source") [Ⓣ][1] Extracts the wrapped value. @@ -1415,7 +1415,7 @@ _.where(stooges, { 'age': 40 }); ### `_.after(n, func)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3332 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3334 "View in source") [Ⓣ][1] Creates a function that is restricted to executing `func` only after it is called `n` times. The `func` is executed with the `this` binding of the created function. @@ -1443,7 +1443,7 @@ _.forEach(notes, function(note) { ### `_.bind(func [, thisArg, arg1, arg2, ...])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3365 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3367 "View in source") [Ⓣ][1] Creates a function that, when called, invokes `func` with the `this` binding of `thisArg` and prepends any additional `bind` arguments to those passed to the bound function. @@ -1474,7 +1474,7 @@ func(); ### `_.bindAll(object [, methodName1, methodName2, ...])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3395 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3397 "View in source") [Ⓣ][1] Binds methods on `object` to `object`, overwriting the existing method. If no method names are provided, all the function properties of `object` will be bound. @@ -1505,7 +1505,7 @@ jQuery('#lodash_button').on('click', buttonView.onClick); ### `_.bindKey(object, key [, arg1, arg2, ...])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3441 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3443 "View in source") [Ⓣ][1] Creates a function that, when called, invokes the method at `object[key]` and prepends any additional `bindKey` arguments to those passed to the bound function. This method differs from `_.bind` by allowing bound functions to reference methods that will be redefined or don't yet exist. See http://michaux.ca/articles/lazy-function-definition-pattern. @@ -1546,7 +1546,7 @@ func(); ### `_.compose([func1, func2, ...])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3464 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3466 "View in source") [Ⓣ][1] Creates a function that is the composition of the passed functions, where each function consumes the return value of the function that follows. In math terms, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. Each function is executed with the `this` binding of the composed function. @@ -1573,7 +1573,7 @@ welcome('moe'); ### `_.debounce(func, wait, immediate)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3497 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3499 "View in source") [Ⓣ][1] Creates a function that will delay the execution of `func` until after `wait` milliseconds have elapsed since the last time it was invoked. Pass `true` for `immediate` to cause debounce to invoke `func` on the leading, instead of the trailing, edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call. @@ -1599,7 +1599,7 @@ jQuery(window).on('resize', lazyLayout); ### `_.defer(func [, arg1, arg2, ...])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3561 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3563 "View in source") [Ⓣ][1] Defers executing the `func` function until the current call stack has cleared. Additional arguments will be passed to `func` when it is invoked. @@ -1624,7 +1624,7 @@ _.defer(function() { alert('deferred'); }); ### `_.delay(func, wait [, arg1, arg2, ...])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3541 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3543 "View in source") [Ⓣ][1] Executes the `func` function after `wait` milliseconds. Additional arguments will be passed to `func` when it is invoked. @@ -1651,7 +1651,7 @@ _.delay(log, 1000, 'logged later'); ### `_.memoize(func [, resolver])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3585 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3587 "View in source") [Ⓣ][1] Creates a function that memoizes the result of `func`. If `resolver` is passed, it will be used to determine the cache key for storing the result based on the arguments passed to the memoized function. By default, the first argument passed to the memoized function is used as the cache key. The `func` is executed with the `this` binding of the memoized function. @@ -1677,7 +1677,7 @@ var fibonacci = _.memoize(function(n) { ### `_.once(func)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3612 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3614 "View in source") [Ⓣ][1] Creates a function that is restricted to execute `func` once. Repeat calls to the function will return the value of the first call. The `func` is executed with the `this` binding of the created function. @@ -1703,7 +1703,7 @@ initialize(); ### `_.partial(func [, arg1, arg2, ...])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3647 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3649 "View in source") [Ⓣ][1] Creates a function that, when called, invokes `func` with any additional `partial` arguments prepended to those passed to the new function. This method is similar to `bind`, except it does **not** alter the `this` binding. @@ -1730,7 +1730,7 @@ hi('moe'); ### `_.throttle(func, wait)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3669 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3671 "View in source") [Ⓣ][1] Creates a function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. If the throttled function is invoked more than once during the `wait` timeout, `func` will also be called on the trailing edge of the timeout. Subsequent calls to the throttled function will return the result of the last `func` call. @@ -1755,7 +1755,7 @@ jQuery(window).on('scroll', throttled); ### `_.wrap(value, wrapper)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3722 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3724 "View in source") [Ⓣ][1] Creates a function that passes `value` to the `wrapper` function as its first argument. Additional arguments passed to the function are appended to those passed to the `wrapper` function. The `wrapper` is executed with the `this` binding of the created function. @@ -2696,7 +2696,7 @@ _.values({ 'one': 1, 'two': 2, 'three': 3 }); ### `_.escape(string)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3746 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3748 "View in source") [Ⓣ][1] Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding HTML entities. @@ -2720,7 +2720,7 @@ _.escape('Moe, Larry & Curly'); ### `_.identity(value)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3764 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3766 "View in source") [Ⓣ][1] This function returns the first argument passed to it. @@ -2745,7 +2745,7 @@ moe === _.identity(moe); ### `_.mixin(object)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3790 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3792 "View in source") [Ⓣ][1] Adds functions properties of `object` to the `lodash` function and chainable wrapper. @@ -2775,7 +2775,7 @@ _('curly').capitalize(); ### `_.noConflict()` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3816 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3818 "View in source") [Ⓣ][1] Reverts the '_' variable to its previous value and returns a reference to the `lodash` function. @@ -2795,7 +2795,7 @@ var lodash = _.noConflict(); ### `_.random([min=0, max=1])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3839 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3841 "View in source") [Ⓣ][1] Produces a random number between `min` and `max` *(inclusive)*. If only one argument is passed, a number between `0` and the given number will be returned. @@ -2823,7 +2823,7 @@ _.random(5); ### `_.result(object, property)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3877 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3879 "View in source") [Ⓣ][1] Resolves the value of `property` on `object`. If `property` is a function it will be invoked and its result returned, else the property value is returned. If `object` is falsey, then `null` is returned. @@ -2858,7 +2858,7 @@ _.result(object, 'stuff'); ### `_.template(text, data, options)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3962 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3964 "View in source") [Ⓣ][1] A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code. Note: In the development build `_.template` utilizes sourceURLs for easier debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl Note: Lo-Dash may be used in Chrome extensions by either creating a `lodash csp` build and avoiding `_.template` use, or loading Lo-Dash in a sandboxed page. See http://developer.chrome.com/trunk/extensions/sandboxingEval.html @@ -2932,7 +2932,7 @@ fs.writeFileSync(path.join(cwd, 'jst.js'), '\ ### `_.times(n, callback [, thisArg])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4093 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4095 "View in source") [Ⓣ][1] Executes the `callback` function `n` times, returning an array of the results of each `callback` execution. The `callback` is bound to `thisArg` and invoked with one argument; *(index)*. @@ -2964,7 +2964,7 @@ _.times(3, function(n) { this.cast(n); }, mage); ### `_.unescape(string)` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4119 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4121 "View in source") [Ⓣ][1] The opposite of `_.escape`, this method converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding characters. @@ -2988,7 +2988,7 @@ _.unescape('Moe, Larry & Curly'); ### `_.uniqueId([prefix])` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4139 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4141 "View in source") [Ⓣ][1] Generates a unique ID. If `prefix` is passed, the ID will be appended to it. @@ -3022,7 +3022,7 @@ _.uniqueId(); ### `_.VERSION` -# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4364 "View in source") [Ⓣ][1] +# [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4366 "View in source") [Ⓣ][1] *(String)*: The semantic version number. diff --git a/doc/parse.php b/doc/parse.php index 7bca1f165..fe04c261d 100644 --- a/doc/parse.php +++ b/doc/parse.php @@ -21,7 +21,7 @@ // generate Markdown $markdown = docdown(array( 'path' => '../' . $file, - 'title' => 'Lo-Dash v1.0.0-rc.2', + 'title' => 'Lo-Dash v1.0.0-rc.3', 'toc' => 'categories', 'url' => 'https://github.com/bestiejs/lodash/blob/master/lodash.js' )); diff --git a/lodash.js b/lodash.js index 80ea7a76a..1238359ff 100644 --- a/lodash.js +++ b/lodash.js @@ -1,5 +1,5 @@ /*! - * Lo-Dash 1.0.0-rc.2 + * Lo-Dash 1.0.0-rc.3 * (c) 2012 John-David Dalton * Based on Underscore.js 1.4.3 * (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc. @@ -4363,7 +4363,7 @@ * @memberOf _ * @type String */ - lodash.VERSION = '1.0.0-rc.2'; + lodash.VERSION = '1.0.0-rc.3'; // add "Chaining" functions to the wrapper lodash.prototype.toString = wrapperToString; diff --git a/lodash.min.js b/lodash.min.js index bf4f058de..4b33a77d7 100644 --- a/lodash.min.js +++ b/lodash.min.js @@ -1,5 +1,5 @@ /*! - Lo-Dash 1.0.0-rc.2 lodash.com/license + Lo-Dash 1.0.0-rc.3 lodash.com/license Underscore.js 1.4.3 underscorejs.org/LICENSE */ ;(function(e,t){function s(e){if(e&&"object"==typeof e&&e.__wrapped__)return e;if(!(this instanceof s))return new s(e);this.__wrapped__=e}function o(e,t,n){t||(t=0);var r=e.length,i=r-t>=(n||it);if(i)for(var s={},n=t-1;++nt||"undefined"==typeof e)return 1;if( @@ -13,10 +13,10 @@ e?t!=+t:0==e?1/e==1/t:e==+t;case Ut:case zt:return e==t+""}a=u==jt;if(!a){if(e._ (e,function(e,n,r){if(Tt.call(r,n))return c++,l=Tt.call(t,n)&&T(e,t[n],s,o)}),l&&hn(t,function(e,t,n){if(Tt.call(n,t))return l=-1<--c}),l}function N(e){return"function"==typeof e}function C(e){return e?sn[typeof e]:i}function k(e){return"number"==typeof e||kt.call(e)==qt}function L(e){return"string"==typeof e||kt.call(e)==zt}function A(e,t,n){var i=arguments,s=0,o=2,u=i[3],a=i[4];n!==rt&&(u=[],a=[],"number"!=typeof n&&(o=i.length));for(;++sn?Dt(0,s+n):n)||0;return"number"==typeof s?o=-1<(L(e)?e.indexOf(t,n):W(e,t,n)):ln(e,function(e){if(++r>=n)return!(o=e===t)}),o}function _(e,t,r){var i=n,t=l(t,r);if(gn(e))for(var r=-1,s=e.length;++rr&&(r=n,o=e)});else for(;++io&&(o=e[i]);return o}function F(e,t){return B(e,t+"")}function I(e,t,r,s){var o=3>arguments.length,t=l(t,s,n);if(gn(e)){var u=-1,a=e.length;for(o&&(r=e[++u]);++uarguments.length;if("number"!=typeof u)var f=bn(e),u=f.length;else Zt&&L(e)&&(o=e.split(""));return t=l(t,s,n),H(e,function(e,n,s){n=f?f[--u]:--u,r=a?(a=i,o[n]):t(r,o[n],n,s)}),r}function R(e,t,n){var r,t=l(t,n);if(gn(e))for(var n=-1,i=e.length;++nn?Dt(0,i+n):n||0)-1;else if(n)return r=V(e,t),e[r]===t?r:-1;for(;++r>>1,n(e[r])W(a,h))(n||f)&&a.push(h),u.push(r)}return u}function J(e,t){return Vt||Lt&&2r&&(r=n,o=e)});else for(;++io&&(o=e[i]);return o}function F(e,t){return B(e,t+"")}function I(e,t,n,r){var s=3>arguments.length,t=l(t,r,rt);if(gn(e)){var o=-1,u=e.length;for(s&&(n=e[++o]);++oarguments.length;if("number"!=typeof o)var a=bn(e),o=a.length;else Zt&&L(e)&&(s=e.split(""));return t=l(t,r,rt),H(e,function(e,r,f){r=a?a[--o]:--o,n=u?(u=i,s[r]):t(n,s[r],r,f)}),n}function R(e,t,n){var r,t=l(t,n);if(gn(e))for(var n=-1,i=e.length;++nn?Dt(0,i+n):n||0)-1;else if(n)return r=V(e,t),e[r]===t?r:-1;for(;++r>>1,n(e[r])W(a,h))(n||f)&&a.push(h),u.push(r)}return u}function J(e,t){return Vt||Lt&&2|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,ut=/&(?:amp|lt|gt|quot|#x27);/g,at=/\b__p\+='';/g,ft=/\b(__p\+=)''\+/g,lt=/(__e\(.*?\)|\b__t\))\+'';/g,ct=/\w*$/,ht=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,pt=RegExp("^"+(tt.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g ,".+?")+"$"),dt=/\$\{((?:(?=\\?)\\?[\s\S])*?)}/g,vt=/<%=([\s\S]+?)%>/g,mt=/($^)/,gt=/[&<>"']/g,yt=/['\n\r\t\u2028\u2029\\]/g,bt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),wt=Math.ceil,Et=et.concat,St=Math.floor,xt=pt.test(xt=Object.getPrototypeOf)&&xt,Tt=tt.hasOwnProperty,Nt=et.push,Ct=tt.propertyIsEnumerable,kt=tt.toString,Lt=pt.test(Lt=m.bind)&&Lt,At=pt.test(At=Array.isArray)&&At,Ot=e.isFinite,Mt=e.isNaN,_t=pt.test(_t=Object.keys)&& _t,Dt=Math.max,Pt=Math.min,Ht=Math.random,Bt="[object Arguments]",jt="[object Array]",Ft="[object Boolean]",It="[object Date]",qt="[object Number]",Rt="[object Object]",Ut="[object RegExp]",zt="[object String]",Wt=!!e.attachEvent,Xt=Lt&&!/\n|true/.test(Lt+Wt),Vt=Lt&&!Xt,$t=_t&&(Wt||Xt),Jt,Kt,Qt=(Qt={0:1,length:1},et.splice.call(Qt,0,1),Qt[0]),Gt=n;(function(){function e(){this.x=1}var t=[];e.prototype={valueOf:1,y:1};for(var n in new e)t.push(n);for(n in arguments)Gt=!n;Jt=!/valueOf/.test(t),Kt="x"!= @@ -26,8 +26,8 @@ t[0]})(1);var Yt=!y(arguments),Zt="xx"!="x"[0]+Object("x")[0];try{var en=("[obje .apply(this,arguments)}},s.assign=cn,s.bind=J,s.bindAll=function(e){for(var t=arguments,n=1W(f,l)){u&&f.push(l);for(var h=n;--h;)if(!(r[h]||(r[h]=o(t[h],0,100)))(l))continue e;a.push(l)}}return a},s.invert=x,s.invoke=function(e,t){var n=m(arguments,2),r="function"==typeof t,i=[];return H(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},s.keys=bn,s.map=B,s.max=j,s.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return Tt.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},s.merge=A -,s.min=function(e,t,n){var r=Infinity,i=-1,s=e?e.length:0,o=r;if(t||!gn(e))t=!t&&L(e)?u:l(t,n),ln(e,function(e,n,i){n=t(e,n,i),nW(s,n,1))i[n]=e}),i},s.once=function(e){var t,s=i;return function( +i];if(u)var c=l+"",c=Tt.call(r[0],c)?!(f=r[0][c]):f=r[0][c]=[];if(c||0>W(f,l)){u&&f.push(l);for(var h=n;--h;)if(!(r[h]||(r[h]=o(t[h],0,100)))(l))continue e;a.push(l)}}return a},s.invert=x,s.invoke=function(e,t){var n=m(arguments,2),r="function"==typeof t,i=[];return H(e,function(e){i.push((r?t:e[t]).apply(e,n))}),i},s.keys=bn,s.map=B,s.max=j,s.memoize=function(e,t){var n={};return function(){var r=t?t.apply(this,arguments):arguments[0];return Tt.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},s.merge= +A,s.min=function(e,t,n){var r=Infinity,i=-1,s=e?e.length:0,o=r;if(t||!gn(e))t=!t&&L(e)?u:l(t,n),ln(e,function(e,n,i){n=t(e,n,i),nW(s,n,1))i[n]=e}),i},s.once=function(e){var t,s=i;return function( ){return s?t:(s=n,t=e.apply(this,arguments),e=r,t)}},s.pairs=function(e){var t=[];return pn(e,function(e,n){t.push([n,e])}),t},s.partial=function(e){return f(e,m(arguments,1))},s.pick=function(e,t,n){var r={};if("function"!=typeof t)for(var i=0,s=Et.apply(et,arguments),o=s.length;++i=l?(clearTimeout(u),u=r,a=f,s=e.apply(o,i)):u||(u=setTimeout(n,l)),s}},s.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++r + * Lo-Dash 1.0.0-rc.3 (Custom Build) * Build: `lodash underscore -d -o ./lodash.underscore.js` * (c) 2012 John-David Dalton * Based on Underscore.js 1.4.3 @@ -389,8 +389,8 @@ * @param {Function|String} [func=identity|property] The function called per * iteration or property name to query. * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @param {Boolean} [accumulating] A flag to indicate creating a callback - * that accepts an `accumulator` argument. + * @param {Object} [accumulating] Used to indicate that the callback should + * accept an `accumulator` argument. * @returns {Function} Returns a callback function. */ function createCallback(func, thisArg, accumulating) { @@ -1989,7 +1989,7 @@ */ function reduce(collection, callback, accumulator, thisArg) { var noaccum = arguments.length < 3; - callback = createCallback(callback, thisArg, true); + callback = createCallback(callback, thisArg, indicatorObject); if (isArray(collection)) { var index = -1, @@ -2038,7 +2038,7 @@ var props = keys(collection); length = props.length; } - callback = createCallback(callback, thisArg, true); + callback = createCallback(callback, thisArg, indicatorObject); forEach(collection, function(value, index, collection) { index = props ? props[--length] : --length; accumulator = noaccum @@ -3811,7 +3811,7 @@ * @memberOf _ * @type String */ - lodash.VERSION = '1.0.0-rc.2'; + lodash.VERSION = '1.0.0-rc.3'; // add functions to `lodash.prototype` mixin(lodash); diff --git a/lodash.underscore.min.js b/lodash.underscore.min.js index 9f5923240..f711b989d 100644 --- a/lodash.underscore.min.js +++ b/lodash.underscore.min.js @@ -1,5 +1,5 @@ /*! - Lo-Dash 1.0.0-rc.2 (Custom Build) lodash.com/license + Lo-Dash 1.0.0-rc.3 (Custom Build) lodash.com/license Build: `lodash underscore -m -o ./lodash.underscore.min.js` Underscore.js 1.4.3 underscorejs.org/LICENSE */ @@ -9,9 +9,9 @@ for(var i in r)e[i]=r[i]}return e}function h(e){var t=[];return Ct(e,function(e, ;switch(i){case dt:case vt:return+e==+t;case mt:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case yt:case bt:return e==t+""}s=i==pt;if(!s){if(e.__wrapped__||t.__wrapped__)return m(e.__wrapped__||e,t.__wrapped__||t);if(i!=gt)return!1;var i=e.constructor,o=t.constructor;if(i!=o&&(!g(i)||!(i instanceof i&&g(o)&&o instanceof o)))return!1}n||(n=[]),r||(r=[]);for(i=n.length;i--;)if(n[i]==e)return r[i]==t;var u=!0,a=0;n.push(e),r.push(t);if(s){a=e.length;if(u=a==t.length)for(;a--&&(u=m(e[a],t[a],n,r)););return u }return Nt(e,function(e,i,s){if(nt.call(s,i))return a++,!(u=nt.call(t,i)&&m(e,t[i],n,r))&&V}),u&&Nt(t,function(e,t,n){if(nt.call(n,t))return!(u=-1<--a)&&V}),u}function g(e){return"function"==typeof e}function y(e){return e?St[typeof e]:!1}function b(e){return"number"==typeof e||it.call(e)==mt}function w(e){return"string"==typeof e||it.call(e)==bt}function E(e){var t=[];return Ct(e,function(e){t.push(e)}),t}function S(e,t){var n=!1;return"number"==typeof (e?e.length:0)?n=-1r&&(r=n,u=e)});else for(;++iu&&(u=e[i]);return u}function A(e,t){return k(e,t+"")}function O(e,t,n,r){var i=3>arguments.length,t=s(t,r,!0);if(At(e) -){var o=-1,u=e.length;for(i&&(n=e[++o]);++oarguments.length;if("number"!=typeof i)var u=Ot(e),i=u.length;return t=s(t,r,!0),C(e,function(r,s,a){s=u?u[--i]:--i,n=o?(o=!1,e[s]):t(n,e[s],s,a)}),n}function _(e,t,n){var r,t=s(t,n);if(At(e))for(var n=-1,i=e.length;++nn?lt(0,i+n):n||0)-1;else if(n)return r=j(e,t),e[r]===t?r:-1;for(;++r>>1,n(e[r])r&&(r=n,u=e)});else for(;++iu&&(u=e[i]);return u}function A(e,t){return k(e,t+"")}function O(e,t,n,r){var i=3>arguments.length,t=s(t,r,V);if(At(e)) +{var o=-1,u=e.length;for(i&&(n=e[++o]);++oarguments.length;if("number"!=typeof i)var u=Ot(e),i=u.length;return t=s(t,r,V),C(e,function(r,s,a){s=u?u[--i]:--i,n=o?(o=!1,e[s]):t(n,e[s],s,a)}),n}function _(e,t,n){var r,t=s(t,n);if(At(e))for(var n=-1,i=e.length;++nn?lt(0,i+n):n||0)-1;else if(n)return r=j(e,t),e[r]===t?r:-1;for(;++r>>1,n(e[r])H(a,f))n&&a.push(f),u.push(r)}return u}function I(e,t){return wt||st&&2"']/g,Y=/['\n\r\t\u2028\u2029\\]/g,Z=Math.ceil,et=W.concat,tt=Math.floor,nt=z.hasOwnProperty,rt=W.push,it=z.toString,st=K.test(st=f.bind)&&st,ot=K.test(ot=Array.isArray)&&ot,ut=e.isFinite ,at=e.isNaN,ft=K.test(ft=Object.keys)&&ft,lt=Math.max,ct=Math.min,ht=Math.random,pt="[object Array]",dt="[object Boolean]",vt="[object Date]",mt="[object Number]",gt="[object Object]",yt="[object RegExp]",bt="[object String]",z=!!e.attachEvent,z=st&&!/\n|true/.test(st+z),wt=st&&!z,Et=(Et={0:1,length:1},W.splice.call(Et,0,1),Et[0]),St={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,"undefined":!1},xt={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};n.templateSettings= @@ -29,5 +29,5 @@ St[typeof e]?At(e)?f(e):c({},e):e},n.contains=S,n.escape=function(e){return null },n.isEqual=m,n.isFinite=function(e){return ut(e)&&!at(parseFloat(e))},n.isFunction=g,n.isNaN=function(e){return b(e)&&e!=+e},n.isNull=function(e){return null===e},n.isNumber=b,n.isObject=y,n.isRegExp=function(e){return e instanceof RegExp||it.call(e)==yt},n.isString=w,n.isUndefined=function(e){return"undefined"==typeof e},n.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?lt(0,r+n):ct(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},n.mixin=R,n.noConflict=function(){return e ._=$,this},n.random=function(e,t){return null==e&&null==t&&(t=1),e=+e||0,null==t&&(t=e,e=0),e+tt(ht()*((+t||0)-e+1))},n.reduce=O,n.reduceRight=M,n.result=function(e,t){var n=e?e[t]:null;return g(n)?e[t]():n},n.size=function(e){var t=e?e.length:0;return"number"==typeof t?t:Ot(e).length},n.some=_,n.sortedIndex=j,n.template=function(e,t,r){e||(e="");var r=p({},r,n.templateSettings),i=0,s="__p+='",u=r.variable;e.replace(RegExp((r.escape||Q).source+"|"+(r.interpolate||Q).source+"|"+(r.evaluate||Q).source+"|$" ,"g"),function(t,n,r,u,a){s+=e.slice(i,a).replace(Y,o),s+=n?"'+_['escape']("+n+")+'":u?"';"+u+";__p+='":r?"'+((__t=("+r+"))==null?'':__t)+'":"",i=a+t.length}),s+="';\n",u||(u="obj",s="with("+u+"||{}){"+s+"}"),s="function("+u+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+s+"return __p}";try{var a=Function("_","return "+s)(n)}catch(f){throw f.source=s,f}return t?a(t):(a.source=s,a)},n.unescape=function(e){return null==e?"":(e+"").replace(J,l)},n.uniqueId= -function(e){var t=++X+"";return e?e+t:t},n.all=x,n.any=_,n.detect=N,n.foldl=O,n.foldr=M,n.include=S,n.inject=O,n.first=D,n.last=function(e,t,n){if(e){var r=e.length;return null==t||n?e[r-1]:f(e,lt(0,r-t))}},n.take=D,n.head=D,n.chain=function(e){return e=new n(e),e.__chain__=!0,e},n.VERSION="1.0.0-rc.2",R(n),n.prototype.chain=function(){return this.__chain__=!0,this},n.prototype.value=function(){return this.__wrapped__},Tt("pop push reverse shift sort splice unshift".split(" "),function(e){var t=W +function(e){var t=++X+"";return e?e+t:t},n.all=x,n.any=_,n.detect=N,n.foldl=O,n.foldr=M,n.include=S,n.inject=O,n.first=D,n.last=function(e,t,n){if(e){var r=e.length;return null==t||n?e[r-1]:f(e,lt(0,r-t))}},n.take=D,n.head=D,n.chain=function(e){return e=new n(e),e.__chain__=!0,e},n.VERSION="1.0.0-rc.3",R(n),n.prototype.chain=function(){return this.__chain__=!0,this},n.prototype.value=function(){return this.__wrapped__},Tt("pop push reverse shift sort splice unshift".split(" "),function(e){var t=W [e];n.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),Et&&e.length===0&&delete e[0],this}}),Tt(["concat","join","slice"],function(e){var t=W[e];n.prototype[e]=function(){var e=t.apply(this.__wrapped__,arguments);return this.__chain__&&(e=new n(e),e.__chain__=!0),e}}),U?"object"==typeof module&&module&&module.exports==U?(module.exports=n)._=n:U._=n:e._=n})(this); \ No newline at end of file diff --git a/package.json b/package.json index c529f3858..35922b1db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lodash", - "version": "1.0.0-rc.2", + "version": "1.0.0-rc.3", "description": "An alternative to Underscore.js, delivering consistency, customization, performance, and extra features.", "homepage": "http://lodash.com", "main": "./lodash", diff --git a/vendor/backbone/backbone.js b/vendor/backbone/backbone.js index 7391faac3..38cc99129 100644 --- a/vendor/backbone/backbone.js +++ b/vendor/backbone/backbone.js @@ -539,7 +539,7 @@ // Check if the attribute has been modified since the last change, // and update `this.changed` accordingly. If we're inside of a `change` // call, also add a trigger to the list. - if (current[key] !== val) { + if (!_.isEqual(current[key], val)) { this.changed[key] = val; if (!loud) continue; triggers.push(key, val); @@ -1042,7 +1042,7 @@ this.handlers = []; _.bindAll(this, 'checkUrl'); - // #1653 - Ensure that `History` can be used outside of the browser. + // Ensure that `History` can be used outside of the browser. if (typeof window !== 'undefined') { this.location = window.location; this.history = window.history; @@ -1238,7 +1238,7 @@ var href = location.href.replace(/(javascript:|#).*$/, ''); location.replace(href + '#' + fragment); } else { - // #1649 - Some browsers require that `hash` contains a leading #. + // Some browsers require that `hash` contains a leading #. location.hash = '#' + fragment; } } diff --git a/vendor/backbone/test/model.js b/vendor/backbone/test/model.js index d8e42380d..c09729801 100644 --- a/vendor/backbone/test/model.js +++ b/vendor/backbone/test/model.js @@ -326,7 +326,6 @@ $(document).ready(function() { equal(model.hasChanged('name'), true); model.change(); equal(model.get('name'), 'Rob'); - }); test("changedAttributes", 3, function() { @@ -944,4 +943,10 @@ $(document).ready(function() { deepEqual(changes, ['a']); }); + test("#1943 change calculations should use _.isEqual", function() { + var model = new Backbone.Model({a: {key: 'value'}}); + model.set('a', {key:'value'}, {silent:true}); + equal(model.changedAttributes(), false); + }); + });