(hooks, next)
| 172 | return data; |
| 173 | }; |
| 174 | var waitHooks = function (hooks, next) { |
| 175 | var nextHook = function () { |
| 176 | if (hooks.length === 0) { |
| 177 | return next(); |
| 178 | } |
| 179 | Hook.wait(instance, opts.hooks[hooks.shift()], function (err) { |
| 180 | if (err) { |
| 181 | return next(err); |
| 182 | } |
| 183 | |
| 184 | return nextHook(); |
| 185 | }); |
| 186 | }; |
| 187 | |
| 188 | return nextHook(); |
| 189 | }; |
| 190 | var saveNew = function (saveOptions, data, cb) { |
| 191 | var i, prop; |
| 192 |
no test coverage detected