Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Human friendly mode gpwd-h #13

Open
katsube opened this issue Mar 18, 2020 · 1 comment
Open

Human friendly mode gpwd-h #13

katsube opened this issue Mar 18, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@katsube
Copy link
Owner

katsube commented Mar 18, 2020

It is new command.

$ gpwd-h
applebananapine 

$ gpwd-h --caps
AppleBananaPine 

option

  • -l, --length (3 to 65534, default 8)
  • -i, --item (1 to 65534, default 1)
  • --caps (Boolean, default false)
    • Capitalize the first letter of each word.
  • --secure (Boolean, default false)
  • -V, --version
  • -h, --help

update configuration file ~/.gpwd.json

{
  "length": 8,
  "strength": "normal",
  "secure": false,
  "human": {
    "length": 8,
    "caps": false,
    "secure":false
  }
}

etc

change method name

genPassword.gen()genPassword.generate()

change module.exports style

current

module.exports = class genPassword {
  // .....
}

after

//-------------------
// lib/genPassword.js
//-------------------
class genPassword {
  // .....
}

//-------------------
// lib/genPasswordHuman.js
//-------------------
class genPasswordHuman{
  // .....
}

//-------------------
// index.js
//-------------------
module.exports = require("./lib/genPassword");
module.exports.human = require("./lib/genPasswordHuman");

example

const genPassword = require("../index.js");
const passwd  = new genPassword();

const genPasswordHuman = require("../index.js").human;
const passwdh  = new genPasswordHuman();
@katsube katsube added the enhancement New feature or request label Mar 18, 2020
@katsube katsube self-assigned this Mar 18, 2020
@katsube katsube changed the title Human friendly mode Human friendly mode gpwd-h Mar 20, 2020
katsube added a commit that referenced this issue Mar 22, 2020
katsube added a commit that referenced this issue Mar 22, 2020
katsube added a commit that referenced this issue Mar 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant