create.js 409 B

1234567891011121314
  1. define(['./_baseCreate', './extendOwn'], function (_baseCreate, extendOwn) {
  2. // Creates an object that inherits from the given prototype object.
  3. // If additional properties are provided then they will be added to the
  4. // created object.
  5. function create(prototype, props) {
  6. var result = _baseCreate(prototype);
  7. if (props) extendOwn(result, props);
  8. return result;
  9. }
  10. return create;
  11. });