Sha256: 71ddc87a3ac308c8d2254e93cc4b12142eebddd87b364878d5fa2eb2ccc9f564

Contents?: true

Size: 358 Bytes

Versions: 2

Compression:

Stored size: 358 Bytes

Contents

export default execute;
export 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()];
}
function executable(config) {
    return typeof config === 'function';
}
//# sourceMappingURL=index.js.map

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pcp-server-ruby-sdk-0.0.6 node_modules/@commitlint/execute-rule/lib/index.js
pcp-server-ruby-sdk-0.1.0 node_modules/@commitlint/execute-rule/lib/index.js