1
0
mirror of https://github.com/S2-/securerandomstring.git synced 2025-08-03 02:40:04 +02:00

remove useless urlsafe: false option

This commit is contained in:
s2
2015-08-27 23:37:05 +02:00
parent 9a72a2cfe2
commit 645d64b940
3 changed files with 6 additions and 25 deletions

View File

@@ -21,19 +21,16 @@ srs(function(err, sr) {
```
### Options: length, urlsafe
### Options: length
Optionally, you can specify a 'length' option to specify a length.
When 'urlsafe' is true (the default), potential `+` and `/` characters are replaced respectively with `-` and `_`.
This is a valid [base64url](https://en.wikipedia.org/wiki/Base64) string.
```javascript
// sync
var result = srs({length: 256, urlsafe:true});
var result = srs({length: 256});
// async
srs({length: 256, urlsafe:true}, function(err, sr) {
srs({length: 256}, function(err, sr) {
console.log(sr);
});
```