mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 23:37:49 +00:00
Move LodashWrapper.prototype and MemCache assignments out of the method assignments block.
This commit is contained in:
22
lodash.js
22
lodash.js
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user