Browse Source

just nerdy whitespace stuff

tags/v1.1.0
s2 2 years ago
parent
commit
275814d49a
2 changed files with 3 additions and 5 deletions
  1. +0
    -1
      README.md
  2. +3
    -4
      lib/secure-random-string.js

+ 0
- 1
README.md View File

@@ -64,4 +64,3 @@ the async API returns the error to the callback.
## License

[MIT](https://github.com/aheckmann/node-ses/blob/master/LICENSE)


+ 3
- 4
lib/secure-random-string.js View File

@@ -27,10 +27,9 @@ function srs(options, cb) {
function _finish(buf) {
var string = buf.toString('base64');
if (alphanumeric === true) {
string = string.replace(/[\W_]+/g,'');
}
else {
string = string.replace(/\//g,'_').replace(/\+/g,'-');
string = string.replace(/[\W_]+/g, '');
} else {
string = string.replace(/\//g, '_').replace(/\+/g, '-');
}
return string.substr(0, length);
}

Loading…
Cancel
Save