MCPcopy Create free account
hub / github.com/OpenWebCAD/node-occ / fn

Function fn

lib/fastbuilder.js:269–275  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

267
268 assert(isFunction(Obj[methodName]), `methodName = ${methodName} ${typeof Obj[methodName]}`);
269 const fn = function () {
270
271 // http://stackoverflow.com/questions/367768/how-to-detect-if-a-function-is-called-as-constructor
272 // Xx console.log(this.constructor.name == methodName, (this.constructor === fn), this.constructor.name);
273 return cache.__proxy(Obj, methodName, arguments, (this.constructor === fn));
274
275 };
276 proxyObj[methodName] = fn;
277 // http://stackoverflow.com/questions/5871040/how-to-dynamically-set-a-function-object-name-in-javascript-as-it-is-displayed-i
278 Object.defineProperty(fn, "name", {value: methodName});

Callers 1

jasmine-1.1.0.jsFile · 0.85

Calls 1

__proxyMethod · 0.80

Tested by

no test coverage detected