init
This commit is contained in:
18
mc_test/node_modules/@dabh/diagnostics/adapters/index.js
generated
vendored
Executable file
18
mc_test/node_modules/@dabh/diagnostics/adapters/index.js
generated
vendored
Executable file
@ -0,0 +1,18 @@
|
||||
var enabled = require('enabled');
|
||||
|
||||
/**
|
||||
* Creates a new Adapter.
|
||||
*
|
||||
* @param {Function} fn Function that returns the value.
|
||||
* @returns {Function} The adapter logic.
|
||||
* @public
|
||||
*/
|
||||
module.exports = function create(fn) {
|
||||
return function adapter(namespace) {
|
||||
try {
|
||||
return enabled(namespace, fn());
|
||||
} catch (e) { /* Any failure means that we found nothing */ }
|
||||
|
||||
return false;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user