MCPcopy
hub / github.com/jashkenas/underscore / baseCreate

Function baseCreate

underscore-node-f.cjs:633–641  ·  view source on GitHub ↗
(prototype)

Source from the content-addressed store, hash-verified

631
632// An internal function for creating a new object that inherits from another.
633function baseCreate(prototype) {
634 if (!isObject(prototype)) return {};
635 if (nativeCreate) return nativeCreate(prototype);
636 var Ctor = ctor();
637 Ctor.prototype = prototype;
638 var result = new Ctor;
639 Ctor.prototype = null;
640 return result;
641}
642
643// Creates an object that inherits from the given prototype object.
644// If additional properties are provided then they will be added to the

Callers 2

createFunction · 0.70
executeBoundFunction · 0.70

Calls 2

isObjectFunction · 0.70
ctorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…