mirror of
https://github.com/S2-/securerandomstring.git
synced 2025-08-02 18:30:04 +02:00
just nerdy whitespace stuff
This commit is contained in:
@@ -64,4 +64,3 @@ the async API returns the error to the callback.
|
|||||||
## License
|
## License
|
||||||
|
|
||||||
[MIT](https://github.com/aheckmann/node-ses/blob/master/LICENSE)
|
[MIT](https://github.com/aheckmann/node-ses/blob/master/LICENSE)
|
||||||
|
|
||||||
|
@@ -27,10 +27,9 @@ function srs(options, cb) {
|
|||||||
function _finish(buf) {
|
function _finish(buf) {
|
||||||
var string = buf.toString('base64');
|
var string = buf.toString('base64');
|
||||||
if (alphanumeric === true) {
|
if (alphanumeric === true) {
|
||||||
string = string.replace(/[\W_]+/g,'');
|
string = string.replace(/[\W_]+/g, '');
|
||||||
}
|
} else {
|
||||||
else {
|
string = string.replace(/\//g, '_').replace(/\+/g, '-');
|
||||||
string = string.replace(/\//g,'_').replace(/\+/g,'-');
|
|
||||||
}
|
}
|
||||||
return string.substr(0, length);
|
return string.substr(0, length);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user