How to use the inheritAsync function from hoek
Find comprehensive JavaScript hoek.inheritAsync code examples handpicked from public code repositorys.
GitHub: janl/good
7 8 9 10 11 12 13 14 15 16
var internals = {}; module.exports.Monitor = internals.ProcessMonitor = function () { Hoek.inheritAsync(internals.ProcessMonitor, process, ['uptime', 'memoryUsage']); }; internals.ProcessMonitor.prototype.memory = function (callback) {
165
1
2
+ 3 other calls in file
8 9 10 11 12 13 14 15 16 17
var internals = {}; module.exports.Monitor = internals.OSMonitor = function () { Hoek.inheritAsync(internals.OSMonitor, Os, ['loadavg', 'uptime', 'freemem', 'totalmem', 'cpus']); }; internals.OSMonitor.prototype.mem = function (callback) {
165
1
2
GitHub: jmonster/good
18 19 20 21 22 23 24 25 26
Hoek.assert(this.constructor === internals.OSMonitor, 'OSMonitor must be instantiated using new'); this.builtins = ['loadavg', 'uptime', 'freemem', 'totalmem', 'cpus']; // Expose Node os functions as async fns Hoek.inheritAsync(internals.OSMonitor, Os, this.public_methods); return this; };
165
0
1
GitHub: jmonster/good
19 20 21 22 23 24 25 26 27 28
options = options || {}; this.builtins = ['uptime', 'memoryUsage']; // Expose Node os functions as async fns Hoek.inheritAsync(internals.ProcessMonitor, process, this.builtins); this._leaks = []; if (options.leakDetection) { this._logLeaks();
165
0
1
hoek.assert is the most popular function in hoek (1712 examples)