1 var baseAssign = require('./_baseAssign'),
2 baseCreate = require('./_baseCreate');
5 * Creates an object that inherits from the `prototype` object. If a `properties`
6 * object is given its own enumerable properties are assigned to the created object.
11 * @param {Object} prototype The object to inherit from.
12 * @param {Object} [properties] The properties to assign to the object.
13 * @returns {Object} Returns the new object.
25 * Circle.prototype = _.create(Shape.prototype, {
26 * 'constructor': Circle
29 * var circle = new Circle;
30 * circle instanceof Circle;
33 * circle instanceof Shape;
36 function create(prototype, properties) {
37 var result = baseCreate(prototype);
38 return properties ? baseAssign(result, properties) : result;
41 module.exports = create;