Skip to content

Commit

Permalink
Reducing complexity and preparing v1.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienrousseau committed Apr 26, 2022
1 parent ceeb63e commit e289076
Show file tree
Hide file tree
Showing 12 changed files with 676 additions and 671 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.6](https://raw.githubusercontent.com/sebastienrousseau/password-generator/master/assets/button-secondary.svg)](https://github.com/sebastienrousseau/password-generator/archive/refs/tags/1.0.6.zip)
[![Download the Password Generator Tool v1.0.7](https://raw.githubusercontent.com/sebastienrousseau/password-generator/master/assets/button-secondary.svg)](https://github.com/sebastienrousseau/password-generator/archive/refs/tags/1.0.7.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
66 changes: 64 additions & 2 deletions docs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,68 @@ <h4 class="name" id="toCharArray"><span class="type-signature">(constant) </span



<h4 class="name" id="toCurrency"><span class="type-signature">(constant) </span>toCurrency<span class="type-signature"></span></h4>




<div class="description">
Takes a number and returns it in the specified currency formatting..
</div>







<dl class="details">


























<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="toCurrency_toCurrency.js.html">toCurrency/toCurrency.js</a>, <a href="toCurrency_toCurrency.js.html#line6">line 6</a>
</li></ul></dd>







</dl>








<h4 class="name" id="toKebabCase"><span class="type-signature">(constant) </span>toKebabCase<span class="type-signature"></span></h4>


Expand Down Expand Up @@ -424,13 +486,13 @@ <h4 class="name" id="toTitleCase"><span class="type-signature">(constant) </span
</div>

<nav>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#toCamelCase">toCamelCase</a></li><li><a href="global.html#toCharArray">toCharArray</a></li><li><a href="global.html#toKebabCase">toKebabCase</a></li><li><a href="global.html#toSnakeCase">toSnakeCase</a></li><li><a href="global.html#toTitleCase">toTitleCase</a></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#toCamelCase">toCamelCase</a></li><li><a href="global.html#toCharArray">toCharArray</a></li><li><a href="global.html#toCurrency">toCurrency</a></li><li><a href="global.html#toKebabCase">toKebabCase</a></li><li><a href="global.html#toSnakeCase">toSnakeCase</a></li><li><a href="global.html#toTitleCase">toTitleCase</a></li></ul>
</nav>

<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 00:13:13 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 19:24:23 GMT+0100 (British Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ <h3> </h3>
</div>

<nav>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#toCamelCase">toCamelCase</a></li><li><a href="global.html#toCharArray">toCharArray</a></li><li><a href="global.html#toKebabCase">toKebabCase</a></li><li><a href="global.html#toSnakeCase">toSnakeCase</a></li><li><a href="global.html#toTitleCase">toTitleCase</a></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#toCamelCase">toCamelCase</a></li><li><a href="global.html#toCharArray">toCharArray</a></li><li><a href="global.html#toCurrency">toCurrency</a></li><li><a href="global.html#toKebabCase">toKebabCase</a></li><li><a href="global.html#toSnakeCase">toSnakeCase</a></li><li><a href="global.html#toTitleCase">toTitleCase</a></li></ul>
</nav>

<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 00:13:14 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 19:24:23 GMT+0100 (British Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
4 changes: 2 additions & 2 deletions docs/toCamelCase_toCamelCase.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ <h1 class="page-title">Source: toCamelCase/toCamelCase.js</h1>
</div>

<nav>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#toCamelCase">toCamelCase</a></li><li><a href="global.html#toCharArray">toCharArray</a></li><li><a href="global.html#toKebabCase">toKebabCase</a></li><li><a href="global.html#toSnakeCase">toSnakeCase</a></li><li><a href="global.html#toTitleCase">toTitleCase</a></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#toCamelCase">toCamelCase</a></li><li><a href="global.html#toCharArray">toCharArray</a></li><li><a href="global.html#toCurrency">toCurrency</a></li><li><a href="global.html#toKebabCase">toKebabCase</a></li><li><a href="global.html#toSnakeCase">toSnakeCase</a></li><li><a href="global.html#toTitleCase">toTitleCase</a></li></ul>
</nav>

<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 00:13:13 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 19:24:23 GMT+0100 (British Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
4 changes: 2 additions & 2 deletions docs/toCharArray_toCharArray.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ <h1 class="page-title">Source: toCharArray/toCharArray.js</h1>
</div>

<nav>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#toCamelCase">toCamelCase</a></li><li><a href="global.html#toCharArray">toCharArray</a></li><li><a href="global.html#toKebabCase">toKebabCase</a></li><li><a href="global.html#toSnakeCase">toSnakeCase</a></li><li><a href="global.html#toTitleCase">toTitleCase</a></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#toCamelCase">toCamelCase</a></li><li><a href="global.html#toCharArray">toCharArray</a></li><li><a href="global.html#toCurrency">toCurrency</a></li><li><a href="global.html#toKebabCase">toKebabCase</a></li><li><a href="global.html#toSnakeCase">toSnakeCase</a></li><li><a href="global.html#toTitleCase">toTitleCase</a></li></ul>
</nav>

<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 00:13:13 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 19:24:23 GMT+0100 (British Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
70 changes: 70 additions & 0 deletions docs/toCurrency_toCurrency.js.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: toCurrency/toCurrency.js</title>

<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

<h1 class="page-title">Source: toCurrency/toCurrency.js</h1>






<section>
<article>
<pre class="prettyprint source linenums"><code>/**
* Takes a number and returns it in the specified currency formatting..
* @param {String} str The text to be converted to kebab case.
*/

export const toCurrency = (n, curr, LanguageFormat = undefined) =>
Intl.NumberFormat(LanguageFormat, {
style: "currency",
minimumFractionDigits: 2,
currency: curr,
}).format(n);

// console.log(toCurrency(123456.789, 'EUR')); // ✔ should convert to €123,456.79 | currency: Euro | currencyLangFormat: Local
// console.log(toCurrency(123456.789, 'RUB', 'Ru-ru')); // ✔ should convert to 123 456,79 ₽ | currency: Ruble | currencyLangFormat: Russian
// console.log(toCurrency(123456.789, 'RUB')); // ✔ should convert to RUB 123,456.79 | currency: Ruble | currencyLangFormat: Local
// console.log(toCurrency(123456.789, 'USD', 'en-us')); // ✔ should convert to $123,456.79 | currency: US Dollar | currencyLangFormat: English (United States)
// console.log(toCurrency(123456.789, 'USD', 'fa')); // ✔ should convert to ۱۲۳٬۴۵۶٫۷۹ ؜$ | currency: US Dollar | currencyLangFormat: Farsi
// console.log(toCurrency(322342436423.2435, "JPY", "fi")); // ✔ should convert to 322 342 436 423 ¥ | currency: Japanese Yen | currencyLangFormat: Finnish
// console.log(toCurrency(322342436423.2435, "JPY")); // ✔ should convert to ¥322,342,436,423 | currency: Japanese Yen | currencyLangFormat: Local
</code></pre>
</article>
</section>




</div>

<nav>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#toCamelCase">toCamelCase</a></li><li><a href="global.html#toCharArray">toCharArray</a></li><li><a href="global.html#toCurrency">toCurrency</a></li><li><a href="global.html#toKebabCase">toKebabCase</a></li><li><a href="global.html#toSnakeCase">toSnakeCase</a></li><li><a href="global.html#toTitleCase">toTitleCase</a></li></ul>
</nav>

<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 19:24:23 GMT+0100 (British Summer Time)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>
4 changes: 2 additions & 2 deletions docs/toKebabCase_toKebabCase.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ <h1 class="page-title">Source: toKebabCase/toKebabCase.js</h1>
</div>

<nav>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#toCamelCase">toCamelCase</a></li><li><a href="global.html#toCharArray">toCharArray</a></li><li><a href="global.html#toKebabCase">toKebabCase</a></li><li><a href="global.html#toSnakeCase">toSnakeCase</a></li><li><a href="global.html#toTitleCase">toTitleCase</a></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#toCamelCase">toCamelCase</a></li><li><a href="global.html#toCharArray">toCharArray</a></li><li><a href="global.html#toCurrency">toCurrency</a></li><li><a href="global.html#toKebabCase">toKebabCase</a></li><li><a href="global.html#toSnakeCase">toSnakeCase</a></li><li><a href="global.html#toTitleCase">toTitleCase</a></li></ul>
</nav>

<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 00:13:13 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 19:24:23 GMT+0100 (British Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
4 changes: 2 additions & 2 deletions docs/toSnakeCase_toSnakeCase.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ <h1 class="page-title">Source: toSnakeCase/toSnakeCase.js</h1>
</div>

<nav>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#toCamelCase">toCamelCase</a></li><li><a href="global.html#toCharArray">toCharArray</a></li><li><a href="global.html#toKebabCase">toKebabCase</a></li><li><a href="global.html#toSnakeCase">toSnakeCase</a></li><li><a href="global.html#toTitleCase">toTitleCase</a></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#toCamelCase">toCamelCase</a></li><li><a href="global.html#toCharArray">toCharArray</a></li><li><a href="global.html#toCurrency">toCurrency</a></li><li><a href="global.html#toKebabCase">toKebabCase</a></li><li><a href="global.html#toSnakeCase">toSnakeCase</a></li><li><a href="global.html#toTitleCase">toTitleCase</a></li></ul>
</nav>

<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 00:13:13 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 19:24:23 GMT+0100 (British Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
4 changes: 2 additions & 2 deletions docs/toTitleCase_toTitleCase.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ <h1 class="page-title">Source: toTitleCase/toTitleCase.js</h1>
</div>

<nav>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#toCamelCase">toCamelCase</a></li><li><a href="global.html#toCharArray">toCharArray</a></li><li><a href="global.html#toKebabCase">toKebabCase</a></li><li><a href="global.html#toSnakeCase">toSnakeCase</a></li><li><a href="global.html#toTitleCase">toTitleCase</a></li></ul>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#toCamelCase">toCamelCase</a></li><li><a href="global.html#toCharArray">toCharArray</a></li><li><a href="global.html#toCurrency">toCurrency</a></li><li><a href="global.html#toKebabCase">toKebabCase</a></li><li><a href="global.html#toSnakeCase">toSnakeCase</a></li><li><a href="global.html#toTitleCase">toTitleCase</a></li></ul>
</nav>

<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Tue Apr 26 2022 00:13:13 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 19:24:23 GMT+0100 (British Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
10 changes: 2 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
#!/usr/bin/env node

import { join } from "path";
import { program } from "commander";
import { readFileSync } from "fs";

const { version } = JSON.parse(
readFileSync(join(process.cwd(), "/package.json"), "utf8")
);

program
.version(version, "-v, --version", "output the current version")
.option("-t, --type <type>", "Specify a password type")
.version("1.0.7", "-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")
.option("-s, --separator <char>", "specify a character for the separator")
Expand Down
Loading

0 comments on commit e289076

Please sign in to comment.