MCPcopy Create free account
hub / github.com/sql-js/sql.js / createObj

Function createObj

GUI/codemirror/lib/codemirror.js:7029–7040  ·  view source on GitHub ↗
(base, props)

Source from the content-addressed store, hash-verified

7027 if ([].map) map = function(array, f) { return array.map(f); };
7028
7029 function createObj(base, props) {
7030 var inst;
7031 if (Object.create) {
7032 inst = Object.create(base);
7033 } else {
7034 var ctor = function() {};
7035 ctor.prototype = base;
7036 inst = new ctor();
7037 }
7038 if (props) copyObj(props, inst);
7039 return inst;
7040 };
7041
7042 function copyObj(obj, target, overwrite) {
7043 if (!target) target = {};

Callers 1

codemirror.jsFile · 0.85

Calls 1

copyObjFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…