Skip to content

Commit

Permalink
rename gen() -> generate() #13
Browse files Browse the repository at this point in the history
  • Loading branch information
katsube committed Mar 22, 2020
1 parent 65601fd commit 10bcb48
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/gpwd-h.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ passwd.setOption({

for(let i=0; i<program.item; i++){
passwd
.gen()
.generate()
.echo();
}
2 changes: 1 addition & 1 deletion bin/gpwd.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,6 @@ passwd.setOption({

for(let i=0; i<program.item; i++){
passwd
.gen()
.generate()
.echo();
}
11 changes: 10 additions & 1 deletion lib/genPassword.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ module.exports = class genPassword {
*
* @returns {object}
*/
gen(){
generate(){
const base = this._getBasestring();
const len = this.opt.length;
const secure = this.opt.secure;
Expand All @@ -147,6 +147,15 @@ module.exports = class genPassword {
return(this);
}

/**
* Generate password (alias)
*
* @returns {object}
*/
gen(){
return( this.generate() );
}

/**
* check exists strength
*
Expand Down
11 changes: 10 additions & 1 deletion lib/genPasswordHuman.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ module.exports = class genPasswordHuman {
*
* @returns {object}
*/
gen(){
generate(){
if( ! this.opt.secure ){
this.passwd = "foobar";
}
Expand All @@ -113,6 +113,15 @@ module.exports = class genPasswordHuman {
return(this);
}

/**
* Generate password (alias)
*
* @returns {object}
*/
gen(){
return( this.generate() );
}

/**
* Secure Math.random()
*
Expand Down

0 comments on commit 10bcb48

Please sign in to comment.