js-generate-password 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GeneratePassword = void 0;
4
- const password_generator_1 = require("../lib/password-generator");
5
- const check_options_error_1 = require("../lib/check-options-error");
6
- const process_options_1 = require("../lib/process-options");
7
- // const errorCheck = require("../../lib/check-options-error");
8
- // const processOptions = require("../../lib/process-options");
4
+ const password_generator_1 = require("./lib/password-generator");
5
+ const check_options_error_1 = require("./lib/check-options-error");
6
+ const process_options_1 = require("./lib/process-options");
9
7
  function GeneratePassword(options) {
10
8
  let pswd;
11
9
  if (options) {
12
10
  options = (0, process_options_1.processOption)(options);
13
11
  (0, check_options_error_1.checkError)(options);
14
- pswd = (0, password_generator_1.generatePassword)(options);
12
+ pswd = (0, password_generator_1.generatePswd)(options);
15
13
  return pswd;
16
14
  }
17
15
  else {
@@ -29,7 +27,7 @@ function GeneratePassword(options) {
29
27
  };
30
28
  options = (0, process_options_1.processOption)(opt);
31
29
  (0, check_options_error_1.checkError)(options);
32
- pswd = (0, password_generator_1.generatePassword)(options);
30
+ pswd = (0, password_generator_1.generatePswd)(options);
33
31
  return pswd;
34
32
  }
35
33
  }
File without changes
File without changes
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generatePassword = void 0;
3
+ exports.generatePswd = void 0;
4
4
  // const generategenerateRandomNumberss = require("./generate-random-number");
5
5
  // const shuffleString = require("./shuffle-string");
6
6
  const generate_random_number_1 = require("./generate-random-number");
7
7
  const shuffle_string_1 = require("./shuffle-string");
8
- const generatePassword = (options) => {
8
+ const generatePswd = (options) => {
9
9
  let pswd = "";
10
10
  let minChar = "";
11
11
  let { length, lowercase, uppercase, numbers, symbols, minLengthLowercase, minLengthUppercase, minLengthNumbers, minLengthSymbols, exclude, } = options;
@@ -54,7 +54,7 @@ const generatePassword = (options) => {
54
54
  }
55
55
  return pswd;
56
56
  };
57
- exports.generatePassword = generatePassword;
57
+ exports.generatePswd = generatePswd;
58
58
  const removeExceptions = (str, EXCEPTIONS) => {
59
59
  EXCEPTIONS === null || EXCEPTIONS === void 0 ? void 0 : EXCEPTIONS.split("").forEach((char) => {
60
60
  str = str.replace(char, "");
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "js-generate-password",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "private": false,
5
5
  "description": "Password Generator for using in javascirpt/typscript based projects.",
6
- "main": "./src/index.js",
7
- "bin": "./src/index.js",
6
+ "main": "./dist/index.js",
7
+ "bin": "./dist/index.js",
8
+ "types": "./src/index.d.ts",
8
9
  "scripts": {
9
10
  "test": "echo \"Error: no test specified\" && exit 1"
10
11
  },
package/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { generatePswd } from "../lib/password-generator";
2
- import { checkError } from "../lib/check-options-error";
3
- import { processOption } from "../lib/process-options";
4
- import { GenerateOptions } from "../lib/types";
1
+ import { generatePswd } from "./lib/password-generator";
2
+ import { checkError } from "./lib/check-options-error";
3
+ import { processOption } from "./lib/process-options";
4
+ import { GenerateOptions } from "./lib/types";
5
5
 
6
6
  function GeneratePassword(options?: GenerateOptions) {
7
7
  let pswd;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes