Skip to content

Commit

Permalink
Remove the need for es-sham.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Sep 24, 2016
1 parent cb07604 commit d6d01cd
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions lodash.js
Expand Up @@ -1657,6 +1657,30 @@
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.
*
Expand Down Expand Up @@ -2690,18 +2714,6 @@
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`
* to provide to `func`.
Expand Down

0 comments on commit d6d01cd

Please sign in to comment.