1 var baseAssign = require('./_baseAssign'),
2 baseCreate = require('./_baseCreate');
5 * Creates an object that inherits from the `prototype` object. If a
6 * `properties` object is given, its own enumerable string keyed properties
7 * are assigned to the created object.
13 * @param {Object} prototype The object to inherit from.
14 * @param {Object} [properties] The properties to assign to the object.
15 * @returns {Object} Returns the new object.
27 * Circle.prototype = _.create(Shape.prototype, {
28 * 'constructor': Circle
31 * var circle = new Circle;
32 * circle instanceof Circle;
35 * circle instanceof Shape;
38 function create(prototype, properties) {
39 var result = baseCreate(prototype);
40 return properties == null ? result : baseAssign(result, properties);
43 module.exports = create;