Skip to content
Browse files

Small improvement in the README.

  • Loading branch information...
1 parent 3c4b1dc commit 18bb9bb29f3ca087e5aa163c03ef82b0474a685d @satazor satazor committed Jan 26, 2013
Showing with 6 additions and 6 deletions.
  1. +6 −6 README.md
View
12 README.md
@@ -24,7 +24,7 @@ Default options:
'trim': true,
// A validator or an array of validators.
'validator': null,
- // Automatically retry on error
+ // Automatically retry if a validator fails
'retry': false
}
```
@@ -42,17 +42,17 @@ function (value) {
}
```
-Example usages:
+Example usages
-Ask for a name.
+Ask for a name:
```js
promptly.prompt('Name: ', function (err, value) {
// err is always null in this case, because no validators are set
console.log(value);
});
```
-Ask for a name with a constraint (non-empty value and length > 2)
+Ask for a name with a constraint (non-empty value and length > 2):
```js
var validator = function (value) {
if (value.length < 2) {
@@ -74,7 +74,7 @@ promptly.prompt('Name: ', { validator: validator }, function (err, value) {
});
```
-Same as above but retry automatically
+Same as above but retry automatically:
```js
var validator = function (value) {
@@ -138,7 +138,7 @@ Example usage:
```js
promptly.password('Type a password: ', function (err, value) {
- console.log('Password is ' + value);
+ console.log('Password is', value);
});
```

0 comments on commit 18bb9bb

Please sign in to comment.
Something went wrong with that request. Please try again.