How to use the once function from hoek
Find comprehensive JavaScript hoek.once code examples handpicked from public code repositorys.
GitHub: codedebug/wreck
142 143 144 145 146 147 148 149 150 151
if (callback) { return callback(err, res); } }; finish = Hoek.once(finish); var onError = function (err) { err.trace = _trace;
107
0
2
GitHub: Marsup/catbox
106 107 108 109 110 111 112 113 114
internals.Policy.prototype._generate = function (id, key, cached, report, callback) { var self = this; var finalize = Hoek.once(function (id, err, value, cached, report) { return self._finalize(id, err, value, cached, report); });
74
0
2
22 23 24 25 26 27 28 29 30 31
}; request._protect.run('handler', finalize, function (exit) { if (request._route._prerequisites) { internals.prerequisites(request, Hoek.once(exit)); } else { internals.handler(request, exit); }
0
0
0
+ 3 other calls in file
GitHub: bielcapanema/hapi
89 90 91 92 93 94 95 96 97
reply.entity = internals.entity; } reply._settings = options; reply._replied = false; reply._next = Hoek.once(next); reply.realm = realm; reply.request = request;
0
0
2
hoek.assert is the most popular function in hoek (1712 examples)