# Module: characterGeneration

Contains all business rules for randomly generating characters of all kinds.

Author:
  - Seth Hollingsead
Copyright:
  - Copyright © 2022-… by Seth Hollingsead. All rights reserved
Source:
  - businessRules/rules/characterGeneration.js, line 1

### Requires

- module:ruleParsing
- module:loggers
- @haystacks/constants
- path

### Methods

#### (inner) convertNumberToLowerCaseLetter(inputData, inputMetaData) → {string}

Converts a number from 1-26 into a lower case letter of the english alphabet a-z.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | A string that contains a number in the range of 1-26 that should be converted in a lower case letter of the english alphabet.
`inputMetaData` | string | Not used for this business rule.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/characterGeneration.js, line 436

##### Returns:

A letter of the alphabet where 1-26 is converted to a letter a-z.

Type
  string

#### (inner) convertNumberToUpperCaseLetter(inputData, inputMetaData) → {string}

Converts a number from 1-26 into an upper case letter of the english alphabet A-Z.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | A string that contains a number in the range of 1-26 that should be converted to an upper case letter of the english alphabet.
`inputMetaData` | string | Not used for this business rule.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/characterGeneration.js, line 404

##### Returns:

A letter of the alphabet where 1-26 is converted in a letter A-Z.

Type
  string

#### (inner) randomlyGenerateBooleanValue(inputData, inputMetaData) → {boolean}

Randomly generates a boolean value {@code TRUE} or {@code FALSE}.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | Not used for this business rule.
`inputMetaData` | string | Not used for this business rule.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/characterGeneration.js, line 318

##### Returns:

A boolean value that is either {@code TRUE} or {@code FALSE} as a random 50-50 chance of one or the other.

Type
  boolean

#### (inner) randomlyGenerateEitherLowerCaseLetterOrNumberOrSpecialCharacter(inputData, inputMetaData) → {string}

Randomly generates an english alphabetic letter from a-z or a number 0-9 or a random special character from the input list of special characters.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | The list of allowable special characters that should be used to randomly select from.
`inputMetaData` | string | Not used for this business rule.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/characterGeneration.js, line 141

##### Returns:

Randomly returns a random number, a random lower case letter of the english alphabet, or a random special character from the list of allowable special characters.

Type
  string

#### (inner) randomlyGenerateEitherMixedCaseLetterOrNumberOrSpecialCharacter(inputData, inputMetaData) → {string}

Randomly generates an alphabetic letter from A-Z, a-z or a number 0-9 or a random special character from the input ist of special characters.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | The list of allowable special characters that should be used to randomly select from.
`inputMetaData` | string | Not used for this business rule.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/characterGeneration.js, line 95

##### Returns:

Randomly returns a random number, a random mixed case letter of the english alphabet, or a random special character from the ist of allowable special characters.

Type
  string

#### (inner) randomlyGenerateEitherUpperCaseLetterOrNumberOrSpecialCharacter(inputData, inputMetaData) → {string}

Randomly generates an english alphabetic letter from A-Z or a number 0-9 or a random special character from the input ist of special characters.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | The list orf allowable special characters that should be used to randomly select from.
`inputMetaData` | string | Not used for this business rule.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/characterGeneration.js, line 118

##### Returns:

Randomly returns a random number, a random upper case letter of the english alphabet, or a random special character from the list of allowable special characters.

Type
  string

#### (inner) randomlyGenerateLowerCaseAlphaNumericCharacter(inputData, inputMetaData) → {string}

Randomly generates an alpha-numeric code from a-z or 0-9.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | Not used for this business rule.
`inputMetaData` | string | Not used for this business rule.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/characterGeneration.js, line 206

##### Returns:

Either a random lower case letter or a random number.

Type
  string

#### (inner) randomlyGenerateLowerCaseLetter(inputData, inputMetaData) → {string}

Randomly generates a lower case english alphabetic letter from a-z.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | Not used for this business rule.
`inputMetaData` | string | Not used for this business rule.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/characterGeneration.js, line 362

##### Returns:

A randomly generated english alphabetic letter from a-z.

Type
  string

#### (inner) randomlyGenerateLowerCaseLetterOrSpecialCharacter(inputData, inputMetaData) → {string}

Randomly generates an english alphabetic letter from a-z or a random special character from the input list of special characters.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | The list of allowable special characters that should be used to randomly select from.
`inputMetaData` | string | Not used for this business rule.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/characterGeneration.js, line 72

##### Returns:

Randomly returns a random lower case letter of the english alphabet, or a random special character from the list of allowable special characters.

Type
  string

#### (inner) randomlyGenerateMixedCaseAlphabeticCharacter(inputData, inputMetaData) → {string}

Randomly generates either an upper case or lower case random english alphabetic letter from a-z or A-Z.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | Not used for this business rule.
`inputMetaData` | string | Not used for this business rule.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/characterGeneration.js, line 340

##### Returns:

A randomly generated english alphabetic letter from a-z or A-Z.

Type
  string

#### (inner) randomlyGenerateMixedCaseAlphaNumericCharacter(inputData, inputMetaData) → {string}

Randomly generates an alpha-numeric code from a-z or A-Z or 0-9.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | Not used for this business rule.
`inputMetaData` | string | Not used for this business rule.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/characterGeneration.js, line 164

##### Returns:

Either a random letter (could be upper case or lower case, which is also random) or a random number.

Type
  string

#### (inner) randomlyGenerateMixedCaseLetterOrSpecialCharacter(inputData, inputMetaData) → {string}

Randomly generates an english alphabetic letter from A-Z, a-z or a random special character from the input list of special characters.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | the list of allowable special characters that should be used to randomly select from.
`inputMetaData` | string | Not used for this business rule.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/characterGeneration.js, line 26

##### Returns:

Randomly returns a random mixed case letter of the english alphabet, or a random special character from the list of allowable special characters.

Type
  string

#### (inner) randomlyGenerateNumberInRange(inputData, inputMetaData) → {string}

Randomly generates a number between the start-range and end-range.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | A string that contains the number with the minimum value.
`inputMetaData` | array.<(string|integer), boolean, boolean> | An array with multiple input parameters: inputMetaData[0] = maximumValue - A string or integer that contains the number with the maximum value. inputMetaData[1] = includeMaximum - A True or False value that indicates if the maximum should be included or excluded from the range of allowable range of values to return from. inputMetaData[2] = addMinimum - A True or False value that indicates if the minimum should be added to the value or not.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/characterGeneration.js, line 275

##### Returns:

The new random number that was generated according to the input parameters.

Type
  string

#### (inner) randomlyGenerateNumericCharacter(inputData, inputMetaData) → {string}

Randomly generates a string character in the range of 0-9.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | Not used for this business rule.
`inputMetaData` | string | Not used for this business rule.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/characterGeneration.js, line 227

##### Returns:

A single randomly generated string character in the range of 0-9.

Type
  string

#### (inner) randomlyGenerateSpecialCharacter(inputData, inputMetaData) → {string}

Randomly select a special character from a list of allowable special characters.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | The list of allowable special characters that should be used to randomly select from.
`inputMetaData` | string | Not used for this business rule.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/characterGeneration.js, line 248

##### Returns:

A character randomly selected from the input list of allowable characters.

Type
  string

#### (inner) randomlyGenerateUpperCaseAlphaNumericCharacter(inputData, inputMetaData) → {string}

Randomly generates an alpha-numeric code from A-Z or 0-9.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | Not used for this business rule.
`inputMetaData` | string | Not used for this business rule.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/characterGeneration.js, line 185

##### Returns:

Either a random upper case letter or a random number.

Type
  string

#### (inner) randomlyGenerateUpperCaseLetter(inputData, inputMetaData) → {string}

Randomly generates an upper case alphabetic letter from A-Z.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | Not used for this business rule.
`inputMetaData` | string | Not used for this business rule.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/characterGeneration.js, line 383

##### Returns:

A randomly generated alphabetic letter from A-Z.

Type
  string

#### (inner) randomlyGenerateUpperCaseLetterOrSpecialCharacter(inputData, inputMetaData) → {string}

Randomly generates an english alphabetic letter from A-Z or a random special character from the input list of special characters.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | The list of allowable special characters that should be used to randomly select from.
`inputMetaData` | string | Not used for this business rule.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/characterGeneration.js, line 49

##### Returns:

Randomly returns a random upper case letter of the english alphabet, or a random special character from the ist of allowable special characters.

Type
  string