| var baseAssign = require('./_baseAssign'), |
| baseCreate = require('./_baseCreate'); |
| * Creates an object that inherits from the `prototype` object. If a |
| * `properties` object is given, its own enumerable string keyed properties |
| * are assigned to the created object. |
| * @param {Object} prototype The object to inherit from. |
| * @param {Object} [properties] The properties to assign to the object. |
| * @returns {Object} Returns the new object. |
| * Circle.prototype = _.create(Shape.prototype, { |
| * var circle = new Circle; |
| * circle instanceof Circle; |
| * circle instanceof Shape; |
| function create(prototype, properties) { |
| var result = baseCreate(prototype); |
| return properties == null ? result : baseAssign(result, properties); |