Skip to content

Commit

Permalink
v1.0.9 - Memorable Password failing on v1.0.7 #12
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienrousseau committed Apr 26, 2022
1 parent c5b370f commit fcc58e1
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
A fast, simple and powerful open-source utility tool for generating strong, unique and random passwords. Password Generator is free to use as a secure password generator on any computer, phone, or tablet.

[![Getting Started](https://raw.githubusercontent.com/sebastienrousseau/password-generator/master/assets/button-primary.svg)](#installation)
[![Download the Password Generator Tool v1.0.8](https://raw.githubusercontent.com/sebastienrousseau/password-generator/master/assets/button-secondary.svg)](https://github.com/sebastienrousseau/password-generator/archive/refs/tags/1.0.8.zip)
[![Download the Password Generator Tool v1.0.9](https://raw.githubusercontent.com/sebastienrousseau/password-generator/master/assets/button-secondary.svg)](https://github.com/sebastienrousseau/password-generator/archive/refs/tags/1.0.9.zip)

[![Codacy Badge](https://app.codacy.com/project/badge/Grade/0acb169c95e443729551979e0fd86eaf)](https://www.codacy.com?utm_source=github.com&utm_medium=referral&utm_content=sebastienrousseau/password-generator&utm_campaign=Badge_Grade)
[![npm](https://img.shields.io/npm/v/@sebastienrousseau/password-generator.svg?style=flat&color=success)](https://www.npmjs.com/package/@sebastienrousseau/password-generator)
Expand Down
2 changes: 1 addition & 1 deletion docs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ <h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.htm
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 20:00:12 GMT+0100 (British Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 22:17:13 GMT+0100 (British Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ <h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.htm
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 20:00:12 GMT+0100 (British Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 22:17:13 GMT+0100 (British Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/toCamelCase_toCamelCase.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ <h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.htm
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 20:00:12 GMT+0100 (British Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 22:17:13 GMT+0100 (British Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/toCharArray_toCharArray.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ <h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.htm
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 20:00:12 GMT+0100 (British Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 22:17:13 GMT+0100 (British Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/toCurrency_toCurrency.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.htm
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 20:00:12 GMT+0100 (British Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 22:17:13 GMT+0100 (British Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/toKebabCase_toKebabCase.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.htm
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 20:00:12 GMT+0100 (British Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 22:17:13 GMT+0100 (British Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/toSnakeCase_toSnakeCase.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.htm
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 20:00:12 GMT+0100 (British Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 22:17:13 GMT+0100 (British Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/toTitleCase_toTitleCase.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.htm
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 20:00:12 GMT+0100 (British Summer Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 22:17:13 GMT+0100 (British Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { program } from "commander";

program
.version("1.0.8", "-v, --version", "output the current version")
.version("1.0.9", "-v, --version", "output the current version")
.option("-t, --type <type>", "specify a password type")
.option("-l, --length <numbers>", "specify a length for each iteration")
.option("-i, --iteration <numbers>", "specify a number of iteration")
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,5 @@
"test": "npm run clean && c8 mocha"
},
"type": "module",
"version": "1.0.8"
"version": "1.0.9"
}
15 changes: 5 additions & 10 deletions src/lib/memorable-password.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
import { promises as fs } from "fs";
import { randomNumber } from "../utils/randomNumber.js";
import { readFile } from "fs/promises";
import { toTitleCase } from "../utils/toTitleCase/toTitleCase.js";

// Initializing Variables
const args = process.argv.slice(2);
let data,
memorable = [];
const data = JSON.parse(
await readFile(new URL("../dictionaries/common.json", import.meta.url))
);
let memorable = [];

// console.log(pwd);
const memorablePassword = async() => {
// Initializing variables
data = await fs.readFile("src/dictionaries/common.json", "utf8");

// Read the JSON dictionary and store it as an array
data = await JSON.parse(data);

// Picking random words from the JSON dictionary based on the data length
data.entries.forEach(() => {
memorable.push(
Expand Down

0 comments on commit fcc58e1

Please sign in to comment.