Bump to v4.0.0.

This commit is contained in:
John-David Dalton
2015-12-16 17:53:20 -08:00
parent 94d714007e
commit 8c26e6fd4c
656 changed files with 16423 additions and 11602 deletions

40
wrapperReverse.js Normal file
View File

@@ -0,0 +1,40 @@
define(['./internal/LazyWrapper', './internal/LodashWrapper', './reverse', './thru'], function(LazyWrapper, LodashWrapper, reverse, thru) {
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
var undefined;
/**
* This method is the wrapper version of `_.reverse`.
*
* **Note:** This method mutates the wrapped array.
*
* @name reverse
* @memberOf _
* @category Seq
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* var array = [1, 2, 3];
*
* _(array).reverse().value()
* // => [3, 2, 1]
*
* console.log(array);
* // => [3, 2, 1]
*/
function wrapperReverse() {
var value = this.__wrapped__;
if (value instanceof LazyWrapper) {
var wrapped = value;
if (this.__actions__.length) {
wrapped = new LazyWrapper(this);
}
wrapped = wrapped.reverse();
wrapped.__actions__.push({ 'func': thru, 'args': [reverse], 'thisArg': undefined });
return new LodashWrapper(wrapped, this.__chain__);
}
return this.thru(reverse);
}
return wrapperReverse;
});