Conditions | 1 |
Paths | 24 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 3 |
1 | const inquirer = require('inquirer'); |
||
13 | constructor() { |
||
14 | this.questions = []; |
||
15 | this.validate = { |
||
16 | notEmpty(value) { |
||
17 | return (value && value.length && value.length > 0) ? true : 'Please enter a value'; |
||
18 | }, |
||
19 | yesNo(value) { |
||
20 | return (value && ['y', 'n', 'yes', 'no'].indexOf(value.toLowerCase()) !== -1) ? |
||
21 | true : 'Invalid input to yes/no question'; |
||
22 | } |
||
23 | }; |
||
24 | } |
||
25 | |||
63 |