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

add err to async example

This commit is contained in:
s2
2015-08-27 22:49:59 +02:00
parent f82819850e
commit f4c0783cfd

View File

@@ -15,7 +15,7 @@ var srs = require('secure-random-string');
var result = srs();
// Async
srs(function(err,sr) {
srs(function(err, 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});
// async
srs({length: 256, urlsafe:true}, function(sr) {
srs({length: 256, urlsafe:true}, function(err, sr) {
console.log(sr);
});
```