Move LodashWrapper.prototype and MemCache assignments out of the method assignments block.

This commit is contained in:
John-David Dalton
2014-10-12 12:38:43 -07:00
parent b5897fdb62
commit e072fe6ea9

View File

@@ -9677,6 +9677,17 @@
/*------------------------------------------------------------------------*/
// ensure `new LodashWrapper` is an instance of `lodash`
LodashWrapper.prototype = lodash.prototype;
// add functions to the memoize cache
MemCache.prototype.get = memGet;
MemCache.prototype.has = memHas;
MemCache.prototype.set = memSet;
// assign cache to `_.memoize`
memoize.Cache = MemCache;
// add functions that return wrapped values when chaining
lodash.after = after;
lodash.assign = assign;
@@ -9784,9 +9795,6 @@
lodash.tail = rest;
lodash.unique = uniq;
// assign cache to `_.memoize`
memoize.Cache = MemCache;
// add functions to `lodash.prototype`
mixin(lodash, lodash);
@@ -10061,19 +10069,11 @@
};
});
// ensure `new LodashWrapper` is an instance of `lodash`
LodashWrapper.prototype = lodash.prototype;
// add functions to the lazy wrapper
LazyWrapper.prototype.clone = lazyClone;
LazyWrapper.prototype.reverse = lazyReverse;
LazyWrapper.prototype.value = lazyValue;
// add functions to the memoize cache
MemCache.prototype.get = memGet;
MemCache.prototype.has = memHas;
MemCache.prototype.set = memSet;
// add chaining functions to the lodash wrapper
lodash.prototype.chain = wrapperChain;
lodash.prototype.reverse = wrapperReverse;