-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(passenger-count): specify number of passengers #11
base: master
Are you sure you want to change the base?
feat(passenger-count): specify number of passengers #11
Conversation
import inquirer from 'inquirer'; | ||
|
||
const isValidPassengerCount = (passengerCount) => { | ||
if (!Number.isNaN(parseFloat(passengerCount)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe using the is-number
npm
library will create less overhead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I was just using the convention in selectMaximumPrice.js
. Maybe it's worth using is-number
there, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
&& parseFloat(passengerCount) >= 1) { | ||
return true; | ||
} | ||
return 'Please enter at least one passenger'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe Please enter a positive number of passengers
?
Logic looks good, can you add screenshots for verifying that this works locally? |
@@ -1,5 +1,5 @@ | |||
{ | |||
"name": "flights-searcher-cli", | |||
"name": "flights-search-cli", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There shouldn't be a package-lock.json
change without a corresponding change to package.json
.
Adds the ability to specify the number of passengers for a flight, defaulting to 1 (see #4)