# Overview

## `Range {}`

The `Range` object represents a range between a minimum and maximum.

{% embed url="<https://github.com/angular-package/range/blob/main/src/lib/range.class.ts>" %}
`range.class.ts`
{% endembed %}

### Accessors

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                                                                                                                                                                                                                                        |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><strong>public get</strong> <a href="accessors/get-range"><strong>range()</strong></a>: <mark style="color:green;">Readonly</mark><<mark style="color:green;">Array</mark><<mark style="color:green;">number</mark>>><br>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get"><code>get</code></a> accessor obtains the range of an <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array"><code>Array</code></a> of the <a href="properties/min">minimum</a> to the <a href="properties/max">maximum</a> with the <a href="accessors/get-step">step</a> of a specified <a href=""><code>Range</code></a> object.</p> |                                                                                                                                                                                                                                                                                                        |
| <p><strong>public get</strong> <a href="accessors/get-step"><strong>step()</strong></a>: <mark style="color:green;">Step</mark><br>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get"><code>get</code></a> accessor obtains the step of a specified <a href=""><code>Range</code></a> object.</p>                                                                                                                                                                                                                                                                                                                                                                |                                                                                                                                                                                                                                                                                                        |
| <p><strong>public get</strong> <a href="accessors/get-steps"><strong>steps()</strong></a>: <mark style="color:green;">number</mark><br>Retrieves the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number"><code>number</code></a> of steps of the specified <a href=""><code>Range</code></a> object.</p>                                                                                                                                                                                                                                                                                                                                                      |                                                                                                                                                                                                                                                                                                        |
| <p><strong>public</strong> <a href="accessors/value"><strong>value()</strong></a>: <mark style="color:green;">number</mark>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | <mark style="color:green;">undefined</mark><br>The <code>value</code> accessor indicates the range current value of the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a> type of a specified <a href=""><code>Range</code></a> object.</p> |
| <p><strong>public get</strong> <a href="accessors/get-symbol.tostringtag"><strong>[Symbol.</strong><mark style="color:blue;"><strong>toStringTag</strong></mark><strong>](https://range.angular-package.dev/draft/range)</strong></a>: <mark style="color:green;">string</mark><br>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get"><code>get</code></a> accessor, with the help of <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag"><code>toStringTag</code></a>, changes the default tag to <code>'Range'</code> for an instance of <a href=""><code>Range</code></a>.</p>                      |                                                                                                                                                                                                                                                                                                        |

### Properties

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public readonly</strong> <a href="properties/max"><strong>max!</strong></a>: <mark style="color:green;">Max</mark><br>The <code>max</code> read-only property is the maximum range of generic type variable <a href="../generic-type-variables#maxextendsnumber"><code>Max</code></a> of a specified <a href=""><code>Range</code></a> object.</p>                                                                                                                                                                                       |
| <p><strong>public readonly</strong> <a href="properties/min"><strong>min!</strong></a>: <mark style="color:green;">Min;</mark><br>The <code>min</code> read-only property is the minimum range of generic type variable <a href="../generic-type-variables#minextendsnumber"><code>Min</code></a> of a specified <a href=""><code>Range</code></a> object.</p>                                                                                                                                                                                      |
| <p><a href="properties/maximum"><strong>#maximum</strong></a>: <mark style="color:green;">Maximum</mark><<mark style="color:green;">Max</mark>><br>Private property of the <a href="../maximum"><code>Maximum</code></a> <a href="https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript">primitive wrapper object</a> with a primitive value from a given <a href="../constructor#max-max"><code>max</code></a> of the <a href=""><code>Range</code></a> constructor indicates the maximum range.</p> |
| <p><a href="properties/minimum"><strong>#minimum</strong></a>: <mark style="color:green;">Minimum</mark><<mark style="color:green;">Min</mark>><br>Private property of the <a href="../minimum"><code>Minimum</code></a> <a href="https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript">primitive wrapper object</a> with a primitive value from a given <a href="../constructor#min-min"><code>min</code></a> of the <a href=""><code>Range</code></a> constructor indicates the minimum range.</p> |
| <p><a href="properties/step"><strong>#step</strong></a>: <mark style="color:green;">Step</mark><br>The private property of the generic type variable <a href="../generic-type-variables#range-less-than-min-max-step-greater-than-2"><code>Step</code></a> indicates the range step.</p>                                                                                                                                                                                                                                                            |
| <p><a href="properties/value"><strong>#value?</strong></a>: <mark style="color:green;">number</mark><br>The private property of the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number"><code>number</code></a> type indicates the range value.</p>                                                                                                                                                                                                                                                   |

### Methods

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public static</strong> <a href="methods/static-create"><strong>create()</strong></a>: <mark style="color:green;">Range</mark><<mark style="color:green;">Value</mark>><br>Returns a new instance of <a href=""><code>Range</code></a> with a range of the given required <a href="../methods/static-create#min-min"><code>min</code></a>, <a href="../methods/static-create#max-max"><code>max</code></a> and optional current <a href="../methods/static-create#value-number"><code>value</code></a>, <a href="../methods/static-create#step-step-1-asstep"><code>step</code></a>.</p>                                            |
| <p><strong>public static</strong> <a href="methods/static-createfrom"><strong>createFrom()</strong></a>: <mark style="color:green;">Range</mark><<mark style="color:green;">number</mark>, <mark style="color:green;">number</mark>, <mark style="color:green;">Step</mark>><br>Creates the <a href=""><code>Range</code></a> instance from the given random <a href="../methods/static-createfrom#numbers-number"><code>numbers</code></a> and the <a href="../methods/static-createfrom#step-step"><code>step</code></a>.</p>                                                                                                               |
| <p><strong>public static</strong> <a href="methods/static-createminimum"><strong>createMaximum()</strong></a>: <mark style="color:green;">Maximum</mark><<mark style="color:green;">Value</mark>><br>Returns the <a href="../maximum"><code>Maximum</code></a> instance of the given <strong>maximum</strong> <a href="../methods/static-createmaximum#value-value"><code>value</code></a>.</p>                                                                                                                                                                                                                                               |
| <p><strong>public static</strong> <a href="methods/static-createminimum"><strong>createMinimum()</strong></a>: <mark style="color:green;">Minimum</mark><<mark style="color:green;">Value</mark>><br>Returns the <a href="../minimum"><code>Minimum</code></a> instance of the given <strong>minimum</strong> <a href="../methods/static-createminimum#value-value"><code>value</code></a>.</p>                                                                                                                                                                                                                                               |
| <p><strong>public static</strong> <a href="methods/static-isrange"><strong>isRange()</strong></a>: value is <mark style="color:green;">Range</mark><<mark style="color:green;">Min</mark>, <mark style="color:green;">Max</mark>><br>Checks whether the <a href="../methods/static-isrange#value-any"><code>value</code></a> is an instance of <a href=""><code>Range</code></a> of any or the given <a href="../methods/static-isrange#min-min"><strong>minimum</strong></a> and <a href="../methods/static-isrange#max-max"><strong>maximum</strong></a> range and <a href="../methods/static-isrange#step-step"><code>step</code></a>.</p> |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |                                                                                                                                                                                                                                                                                                                                             |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public</strong> <a href="methods/foreachstep"><strong>forEachStep()</strong></a>: <mark style="color:green;">this</mark><br>Performs the specified action for each step in the <a href="properties/max">maximum</a> range of an <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array"><code>Array</code></a>.</p>                                                                                                                                                    |                                                                                                                                                                                                                                                                                                                                             |
| <p><strong>public</strong> <a href="methods/getcurrentrange"><strong>getCurrentRange()</strong></a>: <mark style="color:green;">Readonly</mark><<mark style="color:green;">Array</mark><<mark style="color:green;">number</mark>>>                                                                                                                                                                                                                                                                                         | <mark style="color:green;">undefined</mark><br>Returns a range of numbers from <a href="properties/min">minimum</a> to the current <a href="accessors/value">value</a> by the <a href="accessors/get-step"><code>step</code></a> of a specified <a href=""><code>Range</code></a> object.</p>                                               |
| <p><strong>public</strong> <a href="methods/getcurrentstep"><strong>getCurrentStep()</strong></a>: <mark style="color:green;">number</mark>                                                                                                                                                                                                                                                                                                                                                                                | <mark style="color:green;">undefined</mark><br>Returns the step of the range <a href="accessors/value">value</a>.</p>                                                                                                                                                                                                                       |
| <p><a href="../../general-concepts#undefined"><mark style="color:red;">⚠</mark></a> <strong>public</strong> <a href="methods/getmax"><strong>getMax()</strong></a>: <mark style="color:green;">Max</mark><br>Gets the <strong>maximum</strong> range of a specified <a href=""><code>Range</code></a> object.</p>                                                                                                                                                                                                          |                                                                                                                                                                                                                                                                                                                                             |
| <p><a href="../../general-concepts#undefined"><mark style="color:red;">⚠</mark></a> <strong>public</strong> <a href="methods/getmin"><strong>getMin()</strong></a>: <mark style="color:green;">Min</mark><br>Gets the <strong>minimum</strong> range of a specified <a href=""><code>Range</code></a> object.</p>                                                                                                                                                                                                          |                                                                                                                                                                                                                                                                                                                                             |
| <p><strong>public</strong> <a href="methods/getrange"><strong>getRange()</strong></a>: <mark style="color:green;">number</mark>\[]<br>Returns range of numbers from <a href="properties/min">minimum</a> to the given <a href="../methods/getrange#value-number-this.max"><code>value</code></a> with the <a href="accessors/get-step"><code>step</code></a> of a specified <a href=""><code>Range</code></a> object.</p>                                                                                                  |                                                                                                                                                                                                                                                                                                                                             |
| <p><strong>public</strong> <a href="methods/getrangeofstep"><strong>getRangeOfStep()</strong></a>: <mark style="color:green;">Readonly</mark><<mark style="color:green;">Array</mark><<mark style="color:green;">number</mark>>>                                                                                                                                                                                                                                                                                           | <mark style="color:green;">undefined</mark><br>Returns a range of numbers by the specified <a href="accessors/get-step"><code>step</code></a> from the <a href="properties/min">minimum</a> to the given <a href="../methods/getrangeofstep#step-number"><code>step</code></a> of a specified <a href=""><code>Range</code></a> object.</p> |
| <p><strong>public</strong> <a href="methods/getvalueofstep"><strong>getValueOfStep()</strong></a>: <mark style="color:green;">number</mark>                                                                                                                                                                                                                                                                                                                                                                                | <mark style="color:green;">undefined</mark><br>Returns the range value of the given <a href="../methods/getvalueofstep#step-number"><code>step</code></a>.</p>                                                                                                                                                                              |
| <p><strong>public</strong> <a href="methods/has"><strong>has()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="../methods/has#value-number"><code>value</code></a> is in the range of a specified <a href=""><code>Range</code></a> object.</p>                                                                                                                                                                                                                                     |                                                                                                                                                                                                                                                                                                                                             |
| <p><strong>public</strong> <a href="methods/hasevery"><strong>hasEvery()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether every value of the given <a href="../methods/hasevery#...values-number"><code>values</code></a> is in the range of a specified <a href=""><code>Range</code></a> object.</p>                                                                                                                                                                                            |                                                                                                                                                                                                                                                                                                                                             |
| <p><strong>public</strong> <a href="methods/hassome"><strong>hasSome()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether some <a href="../methods/hassome#...values-number"><code>values</code></a> are in the range of a specified <a href=""><code>Range</code></a> object.</p>                                                                                                                                                                                                                  |                                                                                                                                                                                                                                                                                                                                             |
| <p><strong>public</strong> <a href="methods/isbetween"><strong>isBetween()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether range of the given <a href="../methods/isbetween#min-number"><code>min</code></a> and <a href="../methods/isbetween#max-number"><code>max</code></a> is between the range of a specified <a href=""><code>Range</code></a> object.</p>                                                                                                                                |                                                                                                                                                                                                                                                                                                                                             |
| <p><strong>public</strong> <a href="methods/isbetweenevery"><strong>isBetweenEvery()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the range of a specified <a href=""><code>Range</code></a> object is between every range of the given <a href="../methods/isbetweenevery#...ranges-number-number"><code>ranges</code></a>.</p>                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                             |
| <p><strong>public</strong> <a href="methods/isbetweensome"><strong>isBetweenSome()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the range of a specified <a href=""><code>Range</code></a> object is between <strong>some</strong> given <a href="../methods/isbetweensome#...ranges-number-number"><code>ranges</code></a>.</p>                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                             |
| <p><strong>public</strong> <a href="methods/maxgreaterthan"><strong>maxGreaterThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="../methods/maxgreaterthan#value-number"><code>value</code></a> is <strong>less</strong> than the <a href="properties/max"><strong>maximum</strong></a> <strong>range</strong> of a specified <a href=""><code>Range</code></a> object.</p>                                                                                                     |                                                                                                                                                                                                                                                                                                                                             |
| <p><strong>public</strong> <a href="methods/maxlessthan"><strong>maxLessThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="../methods/maxlessthan#value-number"><code>value</code></a> is greater than the <a href="properties/max"><strong>maximum</strong></a> <strong>range</strong> of a specified <a href=""><code>Range</code></a> object.</p>                                                                                                                            |                                                                                                                                                                                                                                                                                                                                             |
| <p><strong>public</strong> <a href="methods/mingreaterthan"><strong>minGreaterThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="../methods/mingreaterthan#value-number"><code>value</code></a> is <strong>less</strong> than a <a href="properties/min"><strong>minimum</strong></a> <strong>range</strong> of a specified <a href=""><code>Range</code></a> object.</p>                                                                                                       |                                                                                                                                                                                                                                                                                                                                             |
| <p><strong>public</strong> <a href="methods/minlessthan"><strong>minLessThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="../methods/minlessthan#value-number"><code>value</code></a> is greater than the <a href="properties/min"><strong>minimum</strong></a> <strong>range</strong> of a specified <a href=""><code>Range</code></a> object.</p>                                                                                                                            |                                                                                                                                                                                                                                                                                                                                             |
| <p><strong>public</strong> <a href="methods/setvalue"><strong>setValue()</strong></a>: <mark style="color:green;">this</mark><br>Sets the range <a href="accessors/value"><code>value</code></a> between the <a href="properties/min">minimum</a> and <a href="../properties/max#range.prototype.max">maximum</a> of a specified <a href=""><code>Range</code></a> object.</p>                                                                                                                                             |                                                                                                                                                                                                                                                                                                                                             |
| <p><strong>public</strong> <a href="methods/setvaluetostep"><strong>setValueToStep()</strong></a>: <mark style="color:green;">this</mark><br>Sets the <a href="accessors/value"><code>value</code></a> of the specified <a href=""><code>Range</code></a> object to the value of the given <a href="../methods/setvaluetostep#step-number"><code>step</code></a>.</p>                                                                                                                                                      |                                                                                                                                                                                                                                                                                                                                             |
| <p><strong>public</strong> <a href="methods/stepbystep"><strong>stepByStep()</strong></a>: <mark style="color:green;">this</mark><br>Performs a callback function with the ability to decide when to move to the next step of the range.</p>                                                                                                                                                                                                                                                                               |                                                                                                                                                                                                                                                                                                                                             |
| <p><a href="../../general-concepts#undefined"><mark style="color:red;">⚠</mark></a> <strong>public</strong> <a href="methods/toarray"><strong>toArray()</strong></a>: readonly \[<mark style="color:green;">Min</mark>, <mark style="color:green;">Max</mark>]<br>Returns a read-only array of the range in order minimum and maximum.</p>                                                                                                                                                                                 |                                                                                                                                                                                                                                                                                                                                             |
| <p><a href="../../general-concepts#undefined"><mark style="color:red;">⚠</mark></a> <strong>public</strong> <a href="../methods/valueof#range.prototype.valueof"><strong>valueOf()</strong></a>: <mark style="color:green;">Readonly</mark><{ min: <mark style="color:green;">Min</mark>; max: <mark style="color:green;">Max</mark> }><br>Returns a read-only object consisting of the primitive values of <a href="../minimum"><code>Minimum</code></a> and <a href="../maximum"><code>Maximum</code></a> instances.</p> |                                                                                                                                                                                                                                                                                                                                             |
