UNPKG

create-instantsearch-app

Version:

⚡️ Build InstantSearch apps at the speed of thought

16 lines (12 loc) 394 B
module.exports = function isQuestionAsked({ question, args }) { // if there's a config, ask no questions, even if it would be invalid if (args.config || !args.interactive) { return true; } const argument = args[question.name]; // Skip if the arg in the command is valid if (question.validate) { return question.validate(argument); } return argument !== undefined; };