mirror of
https://github.com/S2-/securerandomstring.git
synced 2025-08-03 02:40:04 +02:00
Fix error in options name
* Change Readme.md fixing alphabetic by alphanumeric name of options * Add test to new option alphanumeric always expect alphanumeric chars if 'alphanumeric' options is true
This commit is contained in:
@@ -34,16 +34,16 @@ srs({length: 256}, function(err, sr) {
|
||||
console.log(sr);
|
||||
});
|
||||
```
|
||||
### Options: alphabetic
|
||||
### Options: alphanumeric
|
||||
|
||||
Optionally, you can specify a 'alphabetic' option to get a alphabetical chars only.
|
||||
Optionally, you can specify a 'alphanumeric' option to get a alphanumerical chars only.
|
||||
|
||||
```javascript
|
||||
// sync
|
||||
var result = srs({alphabetic: true});
|
||||
var result = srs({alphanumeric: true});
|
||||
|
||||
// async
|
||||
srs({alphabetic: true}, function(err, sr) {
|
||||
srs({alphanumeric: true}, function(err, sr) {
|
||||
console.log(sr);
|
||||
});
|
||||
```
|
||||
|
Reference in New Issue
Block a user