mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
Remove the need for es-sham.
This commit is contained in:
36
lodash.js
36
lodash.js
@@ -1657,6 +1657,30 @@
|
|||||||
return new LodashWrapper(value);
|
return new LodashWrapper(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The base implementation of `_.create` without support for assigning
|
||||||
|
* properties to the created object.
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Object} proto The object to inherit from.
|
||||||
|
* @returns {Object} Returns the new object.
|
||||||
|
*/
|
||||||
|
var baseCreate = (function() {
|
||||||
|
function object() {}
|
||||||
|
return function(proto) {
|
||||||
|
if (!isObject(proto)) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
if (objectCreate) {
|
||||||
|
return objectCreate(proto);
|
||||||
|
}
|
||||||
|
object.prototype = prototype;
|
||||||
|
var result = new object;
|
||||||
|
object.prototype = undefined;
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
}());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The function whose prototype chain sequence wrappers inherit from.
|
* The function whose prototype chain sequence wrappers inherit from.
|
||||||
*
|
*
|
||||||
@@ -2690,18 +2714,6 @@
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* The base implementation of `_.create` without support for assigning
|
|
||||||
* properties to the created object.
|
|
||||||
*
|
|
||||||
* @private
|
|
||||||
* @param {Object} prototype The object to inherit from.
|
|
||||||
* @returns {Object} Returns the new object.
|
|
||||||
*/
|
|
||||||
function baseCreate(proto) {
|
|
||||||
return isObject(proto) ? objectCreate(proto) : {};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The base implementation of `_.delay` and `_.defer` which accepts `args`
|
* The base implementation of `_.delay` and `_.defer` which accepts `args`
|
||||||
* to provide to `func`.
|
* to provide to `func`.
|
||||||
|
|||||||
Reference in New Issue
Block a user