mirror of
https://github.com/S2-/securerandomstring.git
synced 2025-08-02 10:20:05 +02:00
Improve Readme and code stylign
* Alphabetic options added into Readme.md * Add empty space after 'if' in new option validation
This commit is contained in:
@@ -26,9 +26,10 @@ function srs(options, cb) {
|
||||
|
||||
function _finish (buf) {
|
||||
var string = buf.toString('base64');
|
||||
if (alphanumeric === true){
|
||||
if (alphanumeric === true) {
|
||||
string = string.replace(/[\W_]+/g,'');
|
||||
}else{
|
||||
}
|
||||
else {
|
||||
string = string.replace(/\//g,'_').replace(/\+/g,'-');
|
||||
}
|
||||
return string.substr(0, length);
|
||||
|
Reference in New Issue
Block a user