MCPcopy Index your code
hub / github.com/csev/py4e / createObj

Function createObj

tools/pythonauto/static/codemirrorepl/codemirror.js:6971–6982  ·  view source on GitHub ↗
(base, props)

Source from the content-addressed store, hash-verified

6969 if ([].map) map = function(array, f) { return array.map(f); };
6970
6971 function createObj(base, props) {
6972 var inst;
6973 if (Object.create) {
6974 inst = Object.create(base);
6975 } else {
6976 var ctor = function() {};
6977 ctor.prototype = base;
6978 inst = new ctor();
6979 }
6980 if (props) copyObj(props, inst);
6981 return inst;
6982 };
6983
6984 function copyObj(obj, target, overwrite) {
6985 if (!target) target = {};

Callers 1

codemirror.jsFile · 0.70

Calls 1

copyObjFunction · 0.70

Tested by

no test coverage detected