mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
Add baseLodash.
This commit is contained in:
@@ -943,6 +943,16 @@
|
|||||||
return new LodashWrapper(value);
|
return new LodashWrapper(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A no-operation function used to setup inheritance for `lodash`,
|
||||||
|
* `LodashWrapper`, and `LazyWrapper` .
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
function baseLodash() {
|
||||||
|
// No operation performed.
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base constructor for creating `lodash` wrapper objects.
|
* The base constructor for creating `lodash` wrapper objects.
|
||||||
*
|
*
|
||||||
@@ -5689,7 +5699,7 @@
|
|||||||
var result,
|
var result,
|
||||||
parent = this;
|
parent = this;
|
||||||
|
|
||||||
while (parent instanceof LodashWrapper) {
|
while (parent instanceof baseLodash) {
|
||||||
var clone = wrapperClone(parent);
|
var clone = wrapperClone(parent);
|
||||||
if (result) {
|
if (result) {
|
||||||
previous.__wrapped__ = clone;
|
previous.__wrapped__ = clone;
|
||||||
@@ -11012,11 +11022,13 @@
|
|||||||
|
|
||||||
/*------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------*/
|
||||||
|
|
||||||
// Ensure `new LodashWrapper` is an instance of `lodash`.
|
// Ensure wrappers are instances of `baseLodash`.
|
||||||
LodashWrapper.prototype = baseCreate(lodash.prototype);
|
lodash.prototype = baseLodash.prototype;
|
||||||
|
|
||||||
// Ensure `new LazyWraper` is an instance of `LodashWrapper`
|
LodashWrapper.prototype = baseCreate(baseLodash.prototype);
|
||||||
LazyWrapper.prototype = baseCreate(LodashWrapper.prototype);
|
LodashWrapper.prototype.constructor = LodashWrapper;
|
||||||
|
|
||||||
|
LazyWrapper.prototype = baseCreate(baseLodash.prototype);
|
||||||
LazyWrapper.prototype.constructor = LazyWrapper;
|
LazyWrapper.prototype.constructor = LazyWrapper;
|
||||||
|
|
||||||
// Add functions to the `Map` cache.
|
// Add functions to the `Map` cache.
|
||||||
|
|||||||
Reference in New Issue
Block a user