123456789101112131415161718192021222324252627282930 |
- import isObject from './isObject.js';
- var objectCreate = Object.create;
- var baseCreate = (function() {
- function object() {}
- return function(proto) {
- if (!isObject(proto)) {
- return {};
- }
- if (objectCreate) {
- return objectCreate(proto);
- }
- object.prototype = proto;
- var result = new object;
- object.prototype = undefined;
- return result;
- };
- }());
- export default baseCreate;
|