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

rename module

This commit is contained in:
s2
2015-04-25 16:27:22 +02:00
parent 7f2802fac8
commit de3c06d844
4 changed files with 14 additions and 14 deletions

View File

@@ -1,17 +1,17 @@
# securerandomstring
# secure-random-string
a node module that generates a secure random string with a given length
## Usage
`require` it
```
var securerandomstring = require('securerandomstring');
var srs = require('secure-random-string');
```
generate a random string that is 32 chars long (the default)
```
securerandomstring(function(sr) {
srs(function(sr) {
console.log(sr);
});
```
@@ -19,7 +19,7 @@ securerandomstring(function(sr) {
generate a random string that is 256 chars long
```
securerandomstring({length: 256}, function(sr) {
srs({length: 256}, function(sr) {
console.log(sr);
});
```
@@ -27,7 +27,7 @@ securerandomstring({length: 256}, function(sr) {
generate a random string that is 20 chars long and is url safe (can be used as a url token)
```
securerandomstring({length: 20, urlsafe: true}, function(sr) {
srs({length: 20, urlsafe: true}, function(sr) {
console.log(sr);
});
```