UNPKG

hygen

Version:

The scalable code generator that saves you time.

25 lines (17 loc) 386 B
const add = require('./add'); const inject = require('./inject'); const shell = require('./shell'); const resolve = attributes => { const ops = []; if (attributes.to && !attributes.inject) { ops.push(add); } if (attributes.to && attributes.inject) { ops.push(inject); } if (attributes.sh) { ops.push(shell); } return ops; }; module.exports = resolve;