MCPcopy Index your code
hub / github.com/dresende/node-orm2 / emitEvent

Function emitEvent

lib/Instance.js:25–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23 var events = {};
24 var instance = {};
25 var emitEvent = function () {
26 var args = Array.prototype.slice.apply(arguments);
27 var event = args.shift();
28
29 if (!events.hasOwnProperty(event)) return;
30
31 events[event].map(function (cb) {
32 cb.apply(instance, args);
33 });
34 };
35 var rememberKeys = function () {
36 var i, prop;
37

Callers 5

saveErrorFunction · 0.85
runAfterSaveActionsFunction · 0.85
removeInstanceFunction · 0.85
saveInstancePropertyFunction · 0.85
InstanceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected