Bump to v3.0.1.

This commit is contained in:
jdalton
2015-01-29 23:56:52 -08:00
committed by John-David Dalton
parent bb53dde973
commit 60b8329a73
490 changed files with 2148 additions and 2159 deletions

View File

@@ -1,5 +1,5 @@
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
Permission is hereby granted, free of charge, to any person obtaining

View File

@@ -1,4 +1,4 @@
# lodash.reduceright v3.0.0
# lodash.reduceright v3.0.1
The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodashs](https://lodash.com/) `_.reduceRight` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module.
@@ -17,4 +17,4 @@ In Node.js/io.js:
var reduceRight = require('lodash.reduceright');
```
See the [documentation](https://lodash.com/docs#reduceRight) or [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash.reduceright) for more details.
See the [documentation](https://lodash.com/docs#reduceRight) or [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash.reduceright) for more details.

View File

@@ -1,8 +1,8 @@
/**
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
* lodash 3.0.1 (Custom Build) <https://lodash.com/>
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
* Based on Underscore.js 1.8.2 <http://underscorejs.org/LICENSE>
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <https://lodash.com/license>
*/
@@ -13,7 +13,7 @@ var baseCallback = require('lodash._basecallback'),
/**
* A specialized version of `_.reduceRight` for arrays without support for
* callback shorthands or `this` binding.
* callback shorthands and `this` binding.
*
* @private
* @param {Array} array The array to iterate over.
@@ -34,6 +34,23 @@ function arrayReduceRight(array, iteratee, accumulator, initFromArray) {
return accumulator;
}
/**
* Creates a function for `_.reduce` or `_.reduceRight`.
*
* @private
* @param {Function} arrayFunc The function to iterate over an array.
* @param {Function} eachFunc The function to iterate over a collection.
* @returns {Function} Returns the new each function.
*/
function createReduce(arrayFunc, eachFunc) {
return function(collection, iteratee, accumulator, thisArg) {
var initFromArray = arguments.length < 3;
return (typeof iteratee == 'function' && typeof thisArg == 'undefined' && isArray(collection))
? arrayFunc(collection, iteratee, accumulator, initFromArray)
: baseReduce(collection, baseCallback(iteratee, thisArg, 4), accumulator, initFromArray, eachFunc);
};
}
/**
* This method is like `_.reduce` except that it iterates over elements of
* `collection` from right to left.
@@ -56,9 +73,6 @@ function arrayReduceRight(array, iteratee, accumulator, initFromArray) {
* }, []);
* // => [4, 5, 2, 3, 0, 1]
*/
function reduceRight(collection, iteratee, accumulator, thisArg) {
var func = isArray(collection) ? arrayReduceRight : baseReduce;
return func(collection, baseCallback(iteratee, thisArg, 4), accumulator, arguments.length < 3, baseEachRight);
}
var reduceRight = createReduce(arrayReduceRight, baseEachRight);
module.exports = reduceRight;

View File

@@ -1,6 +1,6 @@
{
"name": "lodash.reduceright",
"version": "3.0.0",
"version": "3.0.1",
"description": "The modern build of lodashs `_.reduceRight` as a module.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",