You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

17 lines
484 B

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.execute = void 0;
exports.default = execute;
async function execute(rule) {
if (!Array.isArray(rule)) {
return null;
}
const [name, config] = rule;
const fn = executable(config) ? config : async () => config;
return [name, await fn()];
}
exports.execute = execute;
function executable(config) {
return typeof config === 'function';
}
//# sourceMappingURL=index.js.map