# Module: auxiliaryArrayParsing

Contains all system defined business rules for parsing arrays specific to auxiliary capabilities.

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

### Requires

- module:colorizer
- module:loggers
- @haystacks/constants
- math
- path

### Methods

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

Checks if an array contains a value, checking equality by function(val, arr[i]).

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | array.<array.<(string|integer|boolean|float|object)>, (string|integer|boolean|float|object)> | An array that contains the array that should be searched and the value that should be searched for in the array. inputData[0] = Array to be searched. inputData[1] = Value to be searched for in the array. the input array that should be searched for the given input value.
`inputMetaData` | function | The function that should be used to do the search.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/arrayParsing/auxiliaryArrayParsing.js, line 109

##### Returns:

A True or False to indicate if the value was found in the array or not found.

Type
  boolean

#### (inner) getNamedColorDataArray(inputData, inputMetaData) → {array.<integer>}

This is a business rule wrapper function for calling the colorizer to get named color array data. Looks up the named color data as loaded in the Haystacks engine.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | The name of the color that should be looked up.
`inputMetaData` | array.<integer> | A default array, if the color isn't found.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/arrayParsing/auxiliaryArrayParsing.js, line 87

##### Returns:

An array of integers that represent RGB values.

Type
  array.<integer>

#### (inner) parseColorRangeInputs(inputData, inputMetaData) → {array.<integer>}

Parses minimum and maximum range integer values to ensure they are in the range of 0 - 255.

##### Parameters:

Name | Type | Description
--- | --- | ---
`inputData` | string | integer | The number in either numeric or string format that represents the minimum range that should be used to generate the random color.
`inputMetaData` | string | integer | The number in either numeric or string format that represents the maximum range that should be used to generate the random color.

Author:
  - Seth Hollingsead
Source:
  - businessRules/rules/arrayParsing/auxiliaryArrayParsing.js, line 28

##### Returns:

The minimum and maximum values returned in an array. returnData[0] = minimum value. returnData[1] = maximum value.

Type
  array.<integer>