This package is a simple command line interface helper , you can ask a question and validate answer.That is very simple.
How can i install?
npm install @xncn/simplecli
Let's do a simple example
const simplecli = ;;
Let's do some customize.You can customize text color , just send color argument to simplecli.
Avaible colors : blue,green,red,yellow,magenta,cyan,white,crimson
And you can customize text weight and underline style.
Simplecli includes Validator library, you can validate your data it's so easy.Lets do a exampleİf you want do validation you pass second argument , you can use a callback function.Function includes two arguments they are user prompt and validation errors.
Supported Validation Rules
See validation rule usage in Laravel Documentation
- after (date)
- before (date)