artdaq_node_server  v1_00_07
 All Classes Namespaces Files Variables Pages
_baseCreate.js
1 var isObject = require('./isObject');
2 
4 var objectCreate = Object.create;
5 
14 var baseCreate = (function() {
15  function object() {}
16  return function(proto) {
17  if (!isObject(proto)) {
18  return {};
19  }
20  if (objectCreate) {
21  return objectCreate(proto);
22  }
23  object.prototype = proto;
24  var result = new object;
25  object.prototype = undefined;
26  return result;
27  };
28 }());
29 
30 module.exports = baseCreate;