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

Function createHookHelper

lib/Model.js:42–51  ·  view source on GitHub ↗
(hook)

Source from the content-addressed store, hash-verified

40 var keyProperties = [];
41
42 var createHookHelper = function (hook) {
43 return function (cb) {
44 if (typeof cb !== "function") {
45 delete opts.hooks[hook];
46 } else {
47 opts.hooks[hook] = cb;
48 }
49 return this;
50 };
51 };
52
53 var createInstance = function (data, inst_opts, cb) {
54 if (!inst_opts) {

Callers 1

ModelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected