mirror of
https://github.com/S2-/securerandomstring.git
synced 2025-08-02 18:30:04 +02:00
add err to async example
This commit is contained in:
@@ -15,7 +15,7 @@ var srs = require('secure-random-string');
|
|||||||
var result = srs();
|
var result = srs();
|
||||||
|
|
||||||
// Async
|
// Async
|
||||||
srs(function(err,sr) {
|
srs(function(err, sr) {
|
||||||
console.log(sr);
|
console.log(sr);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ with `_`, created a valid [base64url](https://en.wikipedia.org/wiki/Base64) form
|
|||||||
var result = srs({length: 256, urlsafe:true});
|
var result = srs({length: 256, urlsafe:true});
|
||||||
|
|
||||||
// async
|
// async
|
||||||
srs({length: 256, urlsafe:true}, function(sr) {
|
srs({length: 256, urlsafe:true}, function(err, sr) {
|
||||||
console.log(sr);
|
console.log(sr);
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user