checkOption.js 248 B

1234567
  1. const _ = require('lodash');
  2. module.exports = function checkOption(opts, primaryOption, secondaryOption, value) {
  3. const secondaryOptionValues = _.get(opts[primaryOption][1], secondaryOption);
  4. return _.includes(secondaryOptionValues, value);
  5. };