MCPcopy Index your code
hub / github.com/marijnh/Eloquent-JavaScript / constructorName

Function constructorName

src/client/sandbox.mjs:549–553  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

547}
548
549function constructorName(obj) {
550 if (!obj.constructor) return null
551 let m = String(obj.constructor).match(/^function\s*([^\s(]+)/)
552 if (m && m[1] != "Object") return m[1]
553}
554
555function hop(obj, prop) {
556 return Object.prototype.hasOwnProperty.call(obj, prop)

Callers 2

representSimpleObjFunction · 0.70
expandObjFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected