Bump to v3.10.0.

This commit is contained in:
jdalton
2015-06-14 22:21:45 -07:00
parent 10d5566cf2
commit b97a9a3da0
121 changed files with 1412 additions and 1168 deletions

View File

@@ -24,15 +24,20 @@ var LazyWrapper = require('../internal/LazyWrapper'),
*/
function wrapperReverse() {
var value = this.__wrapped__;
var interceptor = function(value) {
return (wrapped && wrapped.__dir__ < 0) ? value : value.reverse();
};
if (value instanceof LazyWrapper) {
var wrapped = value;
if (this.__actions__.length) {
value = new LazyWrapper(this);
wrapped = new LazyWrapper(this);
}
return new LodashWrapper(value.reverse(), this.__chain__);
wrapped = wrapped.reverse();
wrapped.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
return new LodashWrapper(wrapped, this.__chain__);
}
return this.thru(function(value) {
return value.reverse();
});
return this.thru(interceptor);
}
module.exports = wrapperReverse;