Files
Foundry-VTT-Docker/resources/app/node_modules/@dabh/diagnostics/adapters/index.js

19 lines
401 B
JavaScript
Raw Normal View History

2025-01-04 00:34:03 +01:00
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;
};
}