-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove RxJS for now, and start building out questions for CLI tool.
- Loading branch information
Sean O'Donohue
committed
Mar 3, 2018
1 parent
4212854
commit 3417351
Showing
2 changed files
with
82 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
module.exports = { | ||
isAlphanumeric(input) { | ||
const alphanumeric = /^[0-9a-zA-Z]+$/ | ||
return Boolean(input.match(alphanumeric)) | ||
return Boolean(input.match(alphanumeric)) || 'Please enter an alphanumeric string.' | ||
}, | ||
isNumber(input) { | ||
return !isNaN(parseInt(input, 10)) || 'Please enter a number.' | ||
} | ||
} |