# Introduction

@angular-package/range

## angular-package/range

The range package is based on the [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) of the [`Number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) and extends it with functionalities relevant to the range for determining inequality.

The simplest objects, `Greater` and `Less` indicate as the names suggest the [primitive value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf) is greater or less, and their purpose is to check whether it's greater or less than a single value, every of the given values, or some given values.

`Inequality` abstract [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) has functionalities of both `Greater` and `Less` with the additional ability to check the [primitive value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf) whether it's between the range of the given minimum and maximum, it's between every of the given ranges, or it's between some given ranges.

All the features of the `Inequality` abstract [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) are in the `Number` general object that extends it, and two objects to handle the range, the `Minimum` and `Maximum`, which also extend `Inequality`.

The title object `Range` is just an object consisting of the primitive wrapper objects `Minimum` and `Maximum`. Represents the range and determines the single value is in the range, every value of the given values is in the range, some given values are in the range by using `has` prefixed methods. Determines whether the single range is between the range, every of the given ranges is between the range, some given ranges are between the range.

That's all about the range package, let's see what are the benefits.


# ❤ Benefits

### Primitive wrapper object of Number

Some objects are based on [primitive wrapper objects](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript), and below is a list containing some **pros** of using them and important design benefits.

<details>

<summary>Immutability</summary>

<mark style="color:green;">**✓**</mark> [**Immutable**](https://developer.mozilla.org/en-US/docs/Glossary/Immutable) primitive value of [primitive wrapper objects](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript).

</details>

<details>

<summary>The exact type</summary>

<mark style="color:green;">**✓**</mark> Specific functionality objects with generic type variables(which preserves exact type) act as **precise** types.

</details>

<details>

<summary>Object as types</summary>

<mark style="color:green;">**✓**</mark> Objects have the [`Symbol.toStringTag`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag) changed to **unique immutable** names.

<mark style="color:green;">**✓**</mark> Type of the objects can be determined by the [`Object.prototype.toString.call()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call). because of its **uniqueness** and **immutability**.&#x20;

<mark style="color:green;">**✓**</mark> There is prepared function [`typeOf()`](https://docs.angular-package.dev/v/type/helper/typeof) function of [`@angular-package/type`](https://docs.angular-package.dev/v/type) to determine these objects type.

</details>

<details>

<summary>Functionality <strong>follows</strong> the type</summary>

<mark style="color:green;">**✓**</mark> The most **important** functionalities for a **specific** name.

<mark style="color:green;">**✓**</mark> Objects have functionalities that use primitive values.

</details>

<details>

<summary>Intuitiveness</summary>

<mark style="color:green;">**✓**</mark> General and [**intuitive**](/draft/general-concepts#intuitive) object names.

<mark style="color:green;">**✓**</mark> [Intuitive](/draft/general-concepts#intuitive) names of generic type variables.

<mark style="color:green;">**✓**</mark> [Intuitive](/draft/general-concepts#intuitive) accessor and property names.

<mark style="color:green;">**✓**</mark> [Intuitive](/draft/general-concepts#intuitive) method names.

</details>

<details>

<summary>Minimalism and simplicity</summary>

<mark style="color:green;">**✓**</mark>**&#x20;Minimal**, **simple** to use and an **ease-extendable** objects.

</details>

### Functionality

<details>

<summary>Greater</summary>

<mark style="color:green;">**✓**</mark> Checks whether the primitive value is **greater** than the given value.

<mark style="color:green;">**✓**</mark> Checks whether the primitive value is **greater** than every of the given values.

<mark style="color:green;">**✓**</mark> Checks whether the primitive value is **greater** than some given values.

</details>

<details>

<summary>Less</summary>

<mark style="color:green;">**✓**</mark> Checks whether the primitive value is **less** than the given value.

<mark style="color:green;">**✓**</mark> Checks whether the primitive value is **less** than every of the given values.

<mark style="color:green;">**✓**</mark> Checks whether the primitive value is **less** than some given values.

</details>

<details>

<summary>Inequality</summary>

<mark style="color:green;">**✓**</mark> Functionality of both the `Greater` and `Less` objects.

<mark style="color:green;">**✓**</mark> Checks the primitive value whether it is **between** the given range of the minimum and maximum.

<mark style="color:green;">**✓**</mark> Checks the primitive value whether it is **between** every value of the given ranges.

<mark style="color:green;">**✓**</mark> Checks the primitive value whether it is **between** some given values.

</details>

<details>

<summary>Maximum</summary>

<mark style="color:green;">**✓**</mark> Functionality of the `Inequality` abstract object.

<mark style="color:green;">**✓**</mark> Indicates the **maximum** value.

</details>

<details>

<summary>Minimum</summary>

<mark style="color:green;">**✓**</mark> Functionality of the `Inequality` abstract object.

<mark style="color:green;">**✓**</mark> Indicates the **minimum** value.

</details>

<details>

<summary>Range</summary>

<mark style="color:green;">**✓**</mark> Indicates the range of **minimum and maximum** with the **value** and **step**.

<mark style="color:green;">**✓**</mark> The range value gives the current range.

<mark style="color:green;">**✓**</mark> Updates current range by specified steps down/up, or exact to the step.

<mark style="color:green;">**✓**</mark> Checks whether range of the given minimum and maximum is between the range of a specified `Range` object.

<mark style="color:green;">**✓**</mark> Checks whether the range of a specified `Range` object is between every range of the given `ranges`.

<mark style="color:green;">**✓**</mark> Checks whether the range of a specified `Range` object is between some given `ranges`.

</details>


# General concepts

### ⚠

The warning sign indicates the element is **not** **available** or **deprecated**.

### ★

The element starred as most **useful**.

### **Checks**

It's to **check** the provided value to be the same as **expected**.

### Type guard (constrain)

Constrains the parameter type to not let input unexpected value in the code editor.

### **Guard**

It's a **combination** of both above, **constrains** the type of the parameter in the **code editor**, and checks its provided argument.

### **Creates**

Creates a new instance of an object and returns it.

### **Defines**

Returns defined value from a method of an object.

Defines a new value in an object and returns it.

Defines new or updates existing property in an object and returns an object.

### **Gets**

Returns a value from an object.

### **Sets**

Adds or updates an element with a specified key and a value to an object and returns an object.

### Intuitive

Having the ability to know or understand things without any proof or evidence. E.g. some of the accessor names indicate directly its role.

### General

Relating to the main or major parts of something rather than the details. E.g. some of the accessor names don't indicate the specific role in the object.

{% embed url="<https://docs.angular-package.dev/v/designing/definitions>" %}
More definitions
{% endembed %}


# Skeleton

Base skeleton library

The package was generated by the [library skeleton](https://github.com/angular-package/skeleton) which was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.&#x20;

Copy package to the `packages/range` folder of the [library skeleton](https://github.com/angular-package/skeleton) then run the commands below.

### Code scaffolding

Run `ng generate component component-name --project range` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project range`.

> Note: Don't forget to add `--project range` or else it will be added to the default project in your `angular.json` file.

### Build

Run `ng build range` to build the project. The build artifacts will be stored in the `dist/range` directory.

### **Publishing**

After building your library with `ng build range`, go to the dist folder `cd dist/range` and run `npm publish`.

### **Running unit tests**

Before the test can be performed install [`@angular-package/testing`](https://github.com/angular-package/testing) and [`@angular-package/type`](https://type.angular-package.dev/) with command:&#x20;

```bash
npm i @angular-package/testing @angular-package/type --no-save
```

Run `ng test range` to execute the unit tests via [Karma](https://karma-runner.github.io).

### Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.


# Installation

@angular-package/range installation

The package can be installed into your project via [NPM](https://www.npmjs.com/), or [yarn](https://yarnpkg.com/getting-started/install).

{% tabs %}
{% tab title="npm" %}

```bash
npm install @angular-package/range --save
```

{% endtab %}

{% tab title="yarn" %}

```
yarn add @angular-package/range
```

{% endtab %}
{% endtabs %}


# Public API

@angular-package/range public API

Public features that can be imported.

```typescript
import {
  // Abstract class.
  Inequality,
  // Class.
  Greater,
  Less,
  Maximum,
  Minimum,
  Number,
  Range
} from '@angular-package/range';
```

### `Greater`

The [`Greater`](/draft/greater/overview) [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) represents the [primitive value](/draft/greater/methods/valueof) of the [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) type **greater** than the given.

### `Inequality`

The [`Inequality`](/draft/inequality/overview) abstract [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) represents the [primitive value](/draft/less/methods/valueof) **greater** or **less** than the given.

### `Less`

The [`Less`](/draft/less/overview) [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) represents the [primitive value](/draft/less/methods/valueof) of [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) type **less** than the given.

### `Maximum`

The [`Maximum`](/draft/maximum/overview) [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) extended by the [`Inequality`](/draft/inequality/overview) abstract [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) represents the maximum [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) **greater** or **less** than the given.

### `Minimum`

The [`Minimum`](/draft/minimum/overview) [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) extended by the [`Inequality`](/draft/inequality/overview) abstract primitive wrapper [`object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) represents the minimum [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) **greater** or **less** than the given.

### `Number`

The [`Number`](/draft/number/overview) [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) extended by the [`Inequality`](/draft/inequality/overview) abstract primitive wrapper [`object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) represents the [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) **greater** or **less** than the given.

### `Range`

The [`Range`](/draft/range/overview) object represents a range between a minimum and maximum.


# Basic concepts

The \`range\` package basic concepts

### Greater

### Inequality

### Less

### Maximum

### Minimum

### Range

### Step


# Overview

The \`Greater\` primitive wrapper object

## `Greater {}`

The `Greater` [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) represents the [primitive value](/draft/greater/methods/valueof) of the [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) type **greater** than the given.

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

### Accessors

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public get</strong> <a href="/pages/wAWdfke6J9WNHRixjE8r#symbol.tostringtag"><strong>[Symbol.</strong><mark style="color:blue;"><strong>toStringTag</strong></mark><strong>](https://range.angular-package.dev/draft/greater)</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>'Greater'</code> for an instance of <a href="/pages/Sp6vvBeEd94xHozrVO3n"><code>Greater</code></a>.</p> |

### Methods

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public static</strong> <a href="/pages/lffVMkFq1KjCOW1TxUhB"><strong>create()</strong></a>: <mark style="color:green;">Greater</mark><<mark style="color:green;">Value</mark>><br>Creates the <a href="/pages/Sp6vvBeEd94xHozrVO3n"><code>Greater</code></a> instance with the given primitive <a href="/pages/lffVMkFq1KjCOW1TxUhB#value-value"><code>value</code></a>.</p>                                                                                                                             |
| <p><strong>public static</strong> <a href="/pages/yQFtyHfRZcu3X9d1fIH2"><strong>isGreater()</strong></a>: value is <mark style="color:green;">Greater</mark><<mark style="color:green;">Value</mark>><br>Checks whether the given <a href="#undefined"><code>value</code></a> is the <a href="/pages/Sp6vvBeEd94xHozrVO3n"><code>Greater</code></a> instance of any or given primitive value.</p>                                                                                                                   |
| <p><strong>public</strong> <a href="/pages/ZbBdgPsNzPED3cjUlHDA"><strong>than()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/8ksVRMnJgHREh9Hez1rJ">primitive value</a> of a specified <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>object</code></a> is greater than the given <a href="/pages/ZbBdgPsNzPED3cjUlHDA#value-number"><code>value</code></a>.</p>                                           |
| <p><strong>public</strong> <a href="/pages/XmHQa7he66ydyQdPiihv"><strong>thanEvery()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/8ksVRMnJgHREh9Hez1rJ">primitive value</a> of a specified <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>object</code></a> is greater than <strong>every</strong> value of the given <a href="/pages/XmHQa7he66ydyQdPiihv#...values-number"><code>values</code></a>.</p> |
| <p><strong>public</strong> <a href="/pages/tJkIDyjPHJYQd1HL5dCf"><strong>thanSome()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/8ksVRMnJgHREh9Hez1rJ">primitive value</a> of a specified <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>object</code></a> is greater than <strong>some</strong> given <a href="#...values-number"><code>values</code></a>.</p>                                           |
| <p><strong>public</strong> <a href="/pages/8ksVRMnJgHREh9Hez1rJ"><strong>valueOf()</strong></a>: <mark style="color:green;">Value</mark><br>Returns the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf">primitive value</a> of a specified <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>object</code></a>.</p>                                                                                 |


# Generic type variables

The \`Greater\` primitive wrapper object generic type variables

### `Greater<`<mark style="color:green;background-color:green;">`Value`</mark>`>`

#### <mark style="color:green;">`Value`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

​A generic type variable constrained by the [`number`](https://www.typescriptlang.org/docs/handbook/basic-types.html#number), by default of the value **captured** from the supplied [`value`](/draft/greater/constructor#value-value) indicates the [primitive value](/draft/greater/methods/valueof) type of a new [`Greater`](/draft/greater/overview) instance.

{% code title="greater.class.ts" %}

```typescript
class Greater<
  Value extends number // <--- Declare generic type variable Value.
> extends Number{
  constructor(
    value: Value // <--- Capture generic type variable Value.
  ) {
    super(value);
  }
}
```

{% endcode %}


# ★ Constructor

The \`Greater\` primitive wrapper object constructor

## `Greater()`

Creates the [`Greater`](/draft/greater/overview) instance with the given [`value`](#undefined).

{% code title="greater.class.ts" %}

```typescript
constructor(value: Value) {
  super(value);
}
```

{% endcode %}

### `Parameters`

#### `value:`[<mark style="color:green;">`Value`</mark>](/draft/greater/generic-type-variables#greater-less-than-value-greater-than)

The value of generic type variable [`Value`](/draft/greater/generic-type-variables#greater-less-than-value-greater-than) to set with a new instance.

## Example usage

```typescript
// Example usage.
import { Greater } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns Greater {390} of Greater<390>.
new Greater(id);
```


# Accessors

The \`Greater\` primitive wrapper object accessors

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public get</strong> <a href="/pages/wAWdfke6J9WNHRixjE8r#symbol.tostringtag"><strong>[Symbol.</strong><mark style="color:blue;"><strong>toStringTag</strong></mark><strong>](https://range.angular-package.dev/draft/greater)</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>'Greater'</code> for an instance of <a href="/pages/Sp6vvBeEd94xHozrVO3n"><code>Greater</code></a>.</p> |


# get \[Symbol.toStringTag]\()

Changes the default tag to 'Greater' for an instance

## `[Symbol.toStringTag]`

The [`get`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) accessor, with the help of [`toStringTag`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag), changes the default tag to `'Greater'` for an instance of [`Greater`](/draft/greater/overview).

{% code title="greater.class.ts" %}

```typescript
public get [Symbol.toStringTag](): string {
  return 'Greater';
}
```

{% endcode %}

### Return type

#### [<mark style="color:green;">`string`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#string)

## Example usage

```typescript
// Example usage.
import { Greater } from '@angular-package/range';
import { typeOf } from '@angular-package/type';

// Returns "greater".
typeOf(new Greater(5));
```


# Methods

The \`Greater\` primitive wrapper object methods

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public static</strong> <a href="/pages/lffVMkFq1KjCOW1TxUhB"><strong>create()</strong></a>: <mark style="color:green;">Greater</mark><<mark style="color:green;">Value</mark>><br>Creates the <a href="/pages/Sp6vvBeEd94xHozrVO3n"><code>Greater</code></a> instance with the given primitive <a href="/pages/lffVMkFq1KjCOW1TxUhB#value-value"><code>value</code></a>.</p>                                                                                                                             |
| <p><strong>public static</strong> <a href="/pages/yQFtyHfRZcu3X9d1fIH2"><strong>isGreater()</strong></a>: value is <mark style="color:green;">Greater</mark><<mark style="color:green;">Value</mark>><br>Checks whether the given <a href="#undefined"><code>value</code></a> is the <a href="/pages/Sp6vvBeEd94xHozrVO3n"><code>Greater</code></a> instance of any or given primitive value.</p>                                                                                                                   |
| <p><strong>public</strong> <a href="/pages/ZbBdgPsNzPED3cjUlHDA"><strong>than()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/8ksVRMnJgHREh9Hez1rJ">primitive value</a> of a specified <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>object</code></a> is greater than the given <a href="/pages/ZbBdgPsNzPED3cjUlHDA#value-number"><code>value</code></a>.</p>                                           |
| <p><strong>public</strong> <a href="/pages/XmHQa7he66ydyQdPiihv"><strong>thanEvery()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/8ksVRMnJgHREh9Hez1rJ">primitive value</a> of a specified <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>object</code></a> is greater than <strong>every</strong> value of the given <a href="/pages/XmHQa7he66ydyQdPiihv#...values-number"><code>values</code></a>.</p> |
| <p><strong>public</strong> <a href="/pages/tJkIDyjPHJYQd1HL5dCf"><strong>thanSome()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/8ksVRMnJgHREh9Hez1rJ">primitive value</a> of a specified <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>object</code></a> is greater than <strong>some</strong> given <a href="#...values-number"><code>values</code></a>.</p>                                           |
| <p><strong>public</strong> <a href="/pages/8ksVRMnJgHREh9Hez1rJ"><strong>valueOf()</strong></a>: <mark style="color:green;">Value</mark><br>Returns the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf">primitive value</a> of a specified <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>object</code></a>.</p>                                                                                 |


# static create()

Creates the Greater instance with the given primitive value.

## `Greater.create()`

Creates the [`Greater`](/draft/greater/overview) instance with the given primitive [`value`](#value-value).

{% code title="greater.class.ts" %}

```typescript
public static create<Value extends number>(value: Value): Greater<Value> {
  return new this(value);
}
```

{% endcode %}

### Generic type variables

#### <mark style="color:green;">`Value`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

A generic type variable indicates captured type of the supplied [`value`](#value-value) via the [return type](#return-type).

### Parameters

#### `value:`[<mark style="color:green;">`Value`</mark>](#value-extends-number)

The value of generic type variable [`Value`](#valueextendsnumber) to set with a newly created instance.

### Return type

#### `Greater<`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)`>`

The **return type** is the [`Greater`](/draft/greater/overview) [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) that takes the generic type variable [`Value`](#valueextendsnumber).

### Returns

The **return value** is the [`Greater`](/draft/greater/overview) instance with the [primitive value](/draft/greater/methods/valueof) of the given [`value`](#value-value).

## Example usage

```typescript
// Example usage.
import { Greater } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns Greater {390} of Greater<390>.
Greater.create(id);
```


# static isGreater()

Checks whether the given value is the Greater instance of any or given primitive value

## `Greater.isGreater()`

Checks whether the given [`value`](#undefined) is the [`Greater`](/draft/greater/overview) instance of any or given primitive value.

{% code title="greater.class.ts" %}

```typescript
public static isGreater<Value extends number>(
  value: any,
  greaterValue?: Value
): value is Greater<Value> {
  return (
    typeof value === 'object' &&
    value instanceof this &&
    (typeof greaterValue === 'number'
      ? value.valueOf() === greaterValue
      : true)
  );
}
```

{% endcode %}

### Generic type variables

#### <mark style="color:green;">`Value`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

A generic type variable indicates captured type of the supplied [`greaterValue`](#greatervalue-value) via the [return type](#return-type).

### Parameters

#### `value:`[<mark style="color:green;">`any`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#any)

The value of [`any`](https://www.typescriptlang.org/docs/handbook/basic-types.html#any) type to test against the [`Greater`](/draft/greater/overview) instance.

#### `greaterValue:`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)

An optional value of generic type variable [`Value`](#valueextendsnumber) to check whether it's the primitive value of the given [`value`](#value-any).

### Return type

#### `Greater<`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)`>`

The **return type** is a [`boolean`](https://www.typescriptlang.org/docs/handbook/basic-types.html#boolean) resulting from its statement indicating the [`value`](#value-any) is the [`Greater`](/draft/greater/overview) object that takes the generic type variable [`Value`](#valueextendsnumber).

### Returns

The **return value** is a [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) indicating whether the given [`value`](#value-any) is the [`Greater`](/draft/greater/overview) instance of any or given [primitive value](#greatervalue-value).

## Example usage

```typescript
// Example usage.
import { Greater } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns Greater {390} of Greater<390>.
const id390 = Greater.create(id);

// Returns `true`.
Greater.isGreater(id390);

// Returns `false`.
Greater.isGreater(id390, 381);

// Returns `true`.
Greater.isGreater(id390, 390);
```


# than()

Checks whether the primitive value of a specified object is greater than the given value

## `Greater.prototype.than()`

Checks whether the [primitive value](/draft/greater/methods/valueof) of a specified [`object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) is **greater** than the given [`value`](#value-number).

{% code title="greater.class.ts" %}

```typescript
public than(value: number): boolean {
  return typeof value === 'number' ? this.valueOf() > value : false;
}
```

{% endcode %}

### Parameters

#### `value:`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

The value of [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) type to test.

### Return type

#### [<mark style="color:green;">`boolean`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#boolean)

### Returns

The **return value** is a [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) indicating whether the [primitive value](/draft/greater/methods/valueof) is greater than the given [`value`](#value-number).

## Example usage

```typescript
// Example usage.
import { Greater } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns `false`.
new Greater(id).than(390);

// Returns `true`.
new Greater(id).than(389);
```


# thanEvery()

Checks whether the primitive value of a specified object is greater than every value of the given values

## `Greater.prototype.thanEvery()`

Checks whether the [primitive value](/draft/greater/methods/valueof) of a specified [`object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) is **greater** than **every** value of the given [`values`](#...values-number).

{% code title="greater.class.ts" %}

```typescript
public thanEvery(...values: number[]): boolean {
  return Array.isArray(values)
    ? values.every((value) => this.valueOf() > value)
    : false;
}
```

{% endcode %}

### Parameters

#### `...values:`[<mark style="color:green;">`number`</mark>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)`[]`

A [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters) of the numbers to test.

### Return type

#### [<mark style="color:green;">`boolean`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#boolean)

### Returns

The **return value** is a [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) indicating whether the [primitive value](/draft/greater/methods/valueof) is greater than **every** value of the given [`values`](#...values-number).

## Example usage

```typescript
// Example usage.
import { Greater } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns `false`.
new Greater(id).thanEvery(391, 392, 393)

// Returns `false`.
new Greater(id).thanEvery(387, 388, 389);
```


# thanSome()

Checks whether the primitive value of a specified object is greater than some given values

## `Greater.prototype.thanSome()`

Checks whether the [primitive value](/draft/greater/methods/valueof) of a specified [`object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) is **greater** than **some** given [`values`](#...values-number).

{% code title="greater.class.ts" %}

```typescript
public thanSome(...values: number[]): boolean {
  return Array.isArray(values)
    ? values.some((value) => this.valueOf() < value)
    : false;
}
```

{% endcode %}

### Parameters

#### `...values:`[<mark style="color:green;">`number`</mark>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)`[]`

A [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters) of the numbers to test.

### Return type

#### [<mark style="color:green;">`boolean`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#boolean)

### Returns

The **return value** is a [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) indicating whether the [primitive value](/draft/greater/methods/valueof) is greater than **some** given [`values`](#...values-number).

## Example usage

```typescript
// Example usage.
import { Greater } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns `false`.
new Greater(id).thanSome(390, 391, 392);

// Returns `true`.
new Greater(id).thanSome(389, 391, 392);
```


# valueOf()

Returns the primitive value of a specified object

## `Greater.prototype.valueOf()`

Returns the [primitive value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf) of a specified [`object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object).

{% code title="greater.class.ts" %}

```typescript
public valueOf(): Value {
  return super.valueOf() as any;
}
```

{% endcode %}

### Return type

#### [<mark style="color:green;">`Value`</mark>](/draft/greater/generic-type-variables#greater-less-than-value-greater-than)

### Returns

The **return value** is the [primitive value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf) of generic type variable [`Value`](/draft/greater/generic-type-variables#greater-less-than-value-greater-than).

## Example usage

```typescript
// Example usage.
import { Greater } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns 390 of type 390.
new Greater(id).valueOf();
```


# Overview

The \`Inequality\` primitive wrapper object

## `Inequality {}`

The `Inequality` abstract [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) represents the [primitive value](/draft/less/methods/valueof) **greater** or **less** than the given.

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

### Accessors

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public get</strong> <a href="/pages/feAmMVfYZcgkANTx4K0U#inequality.prototype.greater"><strong>greater()</strong></a>: <mark style="color:green;">Greater</mark><<mark style="color:green;">Value</mark>><br>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get"><code>get</code></a> accessor obtains from the private <a href="/pages/uWz1QRStCpCB3KLwQBqz"><code>#greater</code></a> property an instance of the <a href="/pages/Sp6vvBeEd94xHozrVO3n"><code>Greater</code></a> with a <a href="/pages/8ksVRMnJgHREh9Hez1rJ">primitive value</a> from a given <a href="/pages/i7wyKmH5MvhzOVxKc6Kf#value-value"><code>value</code></a> of the <a href="/pages/c5O6G9ofenL7lHwrYQ9D"><code>Inequality</code></a> constructor.</p> |
| <p><strong>public get</strong> <a href="/pages/4RYs0q3Kz8AX3pu0Ivdr#inequality.prototype.less"><strong>less()</strong></a>: <mark style="color:green;">Less</mark><<mark style="color:green;">Value</mark>><br>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get"><code>get</code></a> accessor obtains from the private <a href="/pages/C0Zj6HuP6vsNJmuZAFN0"><code>#less</code></a> property an instance of the <a href="/pages/CMfgRlfJQkYoJNfwfaip"><code>Less</code></a> with a <a href="/pages/JKCFRuiLu7paenzWw09F">primitive value</a> from a given <a href="/pages/i7wyKmH5MvhzOVxKc6Kf#value-value"><code>value</code></a> of the <a href="/pages/c5O6G9ofenL7lHwrYQ9D"><code>Inequality</code></a> constructor.</p>                |

### Properties

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><a href="/pages/uWz1QRStCpCB3KLwQBqz"><strong>#greater</strong></a>: <mark style="color:green;">Greater</mark><<mark style="color:green;">Value</mark>><br>Private property of the <a href="/pages/Sp6vvBeEd94xHozrVO3n"><code>Greater</code></a> primitive wrapper <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>object</code></a> indicates the value of the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number"><code>number</code></a> type <strong>greater</strong> than the given.</p> |
| <p><a href="/pages/C0Zj6HuP6vsNJmuZAFN0"><strong>#less</strong></a>: <mark style="color:green;">Less</mark><<mark style="color:green;">Value</mark>><br>Private property of the <a href="/pages/CMfgRlfJQkYoJNfwfaip"><code>Less</code></a> primitive wrapper <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>object</code></a> indicates the value of <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number"><code>number</code></a> type <strong>less</strong> than the given.</p>                 |

### Methods

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public</strong> <a href="/pages/qXmMuHtvyMEd1zrg2ThN"><strong>greaterThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript">primitive value</a> of a child class instance is <strong>greater</strong> than the given <a href="/pages/qXmMuHtvyMEd1zrg2ThN#value-number"><code>value</code></a>.</p>                                           |
| <p><strong>public</strong> <a href="/pages/QFXTXHPNCPXbs3aLV955"><strong>greaterThanEvery()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript">primitive value</a> of a child class instance is <strong>greater</strong> than <strong>every</strong> value of the given <a href="/pages/QFXTXHPNCPXbs3aLV955#...values-number"><code>values</code></a>.</p> |
| <p><strong>public</strong> <a href="/pages/kyK3Az0siLQT2Hnbpr8U"><strong>greaterThanSome()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript">primitive value</a> of a child class instance is <strong>greater</strong> than <strong>some</strong> given <a href="/pages/kyK3Az0siLQT2Hnbpr8U#...values-number"><code>values</code></a>.</p>                |
| <p><strong>public</strong> <a href="/pages/PmILNBNZYZXnusd1skO1"><strong>lessThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript">primitive value</a> of a child class instance is <strong>less</strong> than the given <a href="/pages/PmILNBNZYZXnusd1skO1#value-number"><code>value</code></a>.</p>                                                 |
| <p><strong>public</strong> <a href="/pages/EsFliOOJPrEMow3w4PTi"><strong>lessThanEvery()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript">primitive value</a> of a child class instance is <strong>less</strong> than <strong>every</strong> value of the given <a href="/pages/EsFliOOJPrEMow3w4PTi#...values-number"><code>values</code></a>.</p>       |
| <p><strong>public</strong> <a href="/pages/ugE52SDW9tyPAz5WOL9U"><strong>lessThanSome()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript">primitive value</a> of a child class instance is <strong>less</strong> than <strong>some</strong> given <a href="/pages/ugE52SDW9tyPAz5WOL9U#...values-number"><code>values</code></a>.</p>                      |


# Generic type variables

The \`Inequality\` primitive wrapper object generic type variables

### `Inequality<`<mark style="color:green;background-color:green;">`Value`</mark>`>`

#### <mark style="color:green;">`Value`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

​A generic type variable constrained by the [`number`](https://www.typescriptlang.org/docs/handbook/basic-types.html#number), by default of the value **captured** from the supplied [`value`](/draft/inequality/constructor#value-value) indicates the [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) type of a new child class instance.

{% code title="inequality.class.ts" %}

```typescript
abstract class Inequality<
  Value extends number // <--- Declare generic type variable Value.
> extends Number {
  constructor(
    value: Value // <--- Capture generic type variable Value.
  ) {
    super(value);
    this.#greater = new Greater(value);
    this.#less = new Less(value);
  }
}
```

{% endcode %}


# Constructor

The \`Inequality\` primitive wrapper object constructor

## `Inequality()`

Creates a child class instance with the given primitive [`value`](#value-value).

```typescript
constructor(value: Value) {
  super(value);
  this.#greater = new Greater(value);
  this.#less = new Less(value);
}
```

### Parameters

#### `value:`<mark style="color:green;">`Value`</mark>

The value of the generic type variable [`Value`](/draft/inequality/generic-type-variables#inequality-less-than-value-greater-than) is the [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) of a new child class instance.

## Example usage

```typescript
// Example usage.
import { Inequality } from '@angular-package/range';

// Define the `Age` class and extend it with `Inequality`.
class Age<Value extends number> extends Inequality<Value> {}

// Initialize `Age`.
const age = new Age(27);

// Returns Age {27} of Age<27>.
age;
```


# Accessors

The \`Inequality\` primitive wrapper object accessors

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><strong>public get greater()</strong>: <mark style="color:green;">Greater</mark><<mark style="color:green;">Value</mark>><br>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get"><code>get</code></a> accessor obtains from the private <a href="/pages/uWz1QRStCpCB3KLwQBqz"><code>#greater</code></a> property an instance of the <a href="/pages/Sp6vvBeEd94xHozrVO3n"><code>Greater</code></a> with a <a href="/pages/8ksVRMnJgHREh9Hez1rJ">primitive value</a> from a given <a href="/pages/i7wyKmH5MvhzOVxKc6Kf#value-value"><code>value</code></a> of the <a href="/pages/c5O6G9ofenL7lHwrYQ9D"><code>Inequality</code></a> constructor.</p> |
| <p><strong>public get less()</strong>: <mark style="color:green;">Less</mark><<mark style="color:green;">Value</mark>><br>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get"><code>get</code></a> accessor obtains from the private <a href="/pages/C0Zj6HuP6vsNJmuZAFN0"><code>#less</code></a> property an instance of the <a href="/pages/CMfgRlfJQkYoJNfwfaip"><code>Less</code></a> with a <a href="/pages/JKCFRuiLu7paenzWw09F">primitive value</a> from a given <a href="/pages/i7wyKmH5MvhzOVxKc6Kf#value-value"><code>value</code></a> of the <a href="/pages/c5O6G9ofenL7lHwrYQ9D"><code>Inequality</code></a> constructor.</p>             |


# get greater()

The get accessor obtains from the private #greater property an instance of the Greater

## `Inequality.prototype.greater`

The [`get`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) accessor obtains from the private [`#greater`](/draft/inequality/properties/greater) property an instance of the [`Greater`](/draft/greater/overview) with a [primitive value](/draft/greater/methods/valueof) from a given [`value`](/draft/inequality/constructor#value-value) of the [`Inequality`](/draft/inequality/overview) constructor.

{% code title="inequality.class.ts" %}

```typescript
public get greater(): Greater<Value> {
  return this.#greater;
}
```

{% endcode %}

### Return type

#### `Greater<`[<mark style="color:green;">`Value`</mark>](/draft/inequality/generic-type-variables#inequality-less-than-value-greater-than)`>`

The **return type** is the [`Greater`](/draft/greater/overview) [primitive wrapper](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) object that takes the generic type variable [`Value`](/draft/inequality/generic-type-variables#inequality-less-than-value-greater-than) of the [`Inequality`](/draft/inequality/overview) object.

### Returns

The **return value** is the [`Greater`](/draft/greater/overview) instance with a [primitive value](/draft/greater/methods/valueof) from the given [`value`](/draft/inequality/constructor#value-value) of the [`Inequality`](/draft/inequality/overview) constructor.

## Example usage

```typescript
// Example usage.
import { Inequality } from '@angular-package/range';

// Define the `Year` class and extend it with `Inequality`.
class Year<Value extends number> extends Inequality<Value> {}

// Initialize `Year`.
const year = new Year(1981);

// Returns Year {1981} of Year<1981>.
year;

// Returns Greater {1981} of Greater<1981>
year.greater;

// Returns `false`.
year.greater.than(1982);

// Returns `false`.
year.greater.thanEvery(1981, 1982, 1983);

// Returns `true`.
year.greater.thanSome(1981, 1980, 1979);
```


# get less()

The get accessor obtains from the private #less property an instance of the Less

## `Inequality.prototype.less`

The [`get`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) accessor obtains from the private [`#less`](/draft/inequality/properties/less) property an instance of the [`Less`](/draft/less/overview) with a [primitive value](/draft/less/methods/valueof) from a given [`value`](/draft/inequality/constructor#value-value) of the [`Inequality`](/draft/inequality/overview) constructor.

{% code title="inequality.class.ts" %}

```typescript
public get less(): Less<Value> {
  return this.#less;
}
```

{% endcode %}

### Return type

#### `Less<`[<mark style="color:green;">`Value`</mark>](/draft/inequality/generic-type-variables#inequality-less-than-value-greater-than)`>`

The **return type** is the [`Less`](/draft/less/overview) [primitive wrapper](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) object that takes the generic type variable [`Value`](/draft/inequality/generic-type-variables#inequality-less-than-value-greater-than) of the [`Inequality`](/draft/inequality/overview) object.

### Returns

The **return value** is the [`Less`](/draft/less/overview) instance with a [primitive value](/draft/greater/methods/valueof) from the given [`value`](/draft/inequality/constructor#value-value) of the [`Inequality`](/draft/inequality/overview) constructor.

## Example usage

```typescript
// Example usage.
import { Inequality } from '@angular-package/range';

// Define the `Year` class and extend it with `Inequality`.
class Year<Value extends number> extends Inequality<Value> {}

// Initialize `Year`.
const year = new Year(1981);

// Returns Year {1981} of Year<1981>.
year;

// Returns Less {1981} of Less<1981>
year.less;

// Returns `true`.
year.less.than(1982);

// Returns `false`.
year.less.thanEvery(1981, 1982, 1983);

// Returns `false`.
year.less.thanSome(1981, 1980, 1979);
```


# Properties

The \`Inequality\` primitive wrapper object properties

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><a href="/pages/uWz1QRStCpCB3KLwQBqz"><strong>#greater</strong></a>: <mark style="color:green;">Greater</mark><<mark style="color:green;">Value</mark>><br>Private property of the <a href="/pages/Sp6vvBeEd94xHozrVO3n"><code>Greater</code></a> primitive wrapper <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>object</code></a> indicates the value of the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number"><code>number</code></a> type <strong>greater</strong> than the given.</p> |
| <p><a href="/pages/C0Zj6HuP6vsNJmuZAFN0"><strong>#less</strong></a>: <mark style="color:green;">Less</mark><<mark style="color:green;">Value</mark>><br>Private property of the <a href="/pages/CMfgRlfJQkYoJNfwfaip"><code>Less</code></a> primitive wrapper <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>object</code></a> indicates the value of <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number"><code>number</code></a> type <strong>less</strong> than the given.</p>                 |


# #greater

Private property of the Greater primitive wrapper object

## `#greater`

Private property of the [`Greater`](/draft/greater/overview) primitive wrapper [`object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) indicates the value of the [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) type **greater** than the given.

{% hint style="info" %}
Property is used by the `get` accessor [**`greater`**](/draft/inequality/accessors/get-greater).
{% endhint %}

{% code title="inequality.class.ts" %}

```typescript
#greater: Greater<Value>;
```

{% endcode %}


# #less

## `#less`

Private property of the [`Less`](/draft/less/overview) primitive wrapper [`object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) indicates the value of [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) type **less** than the given.

{% hint style="info" %}
Property is used by the `get` accessor [**`less`**](/draft/inequality/accessors/get-less).
{% endhint %}

{% code title="inequality.class.ts" %}

```typescript
#less: Less<Value>;
```

{% endcode %}


# Methods

The \`Inequality\` primitive wrapper object methods

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public</strong> <a href="/pages/qXmMuHtvyMEd1zrg2ThN"><strong>greaterThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript">primitive value</a> of a child class instance is <strong>greater</strong> than the given <a href="/pages/qXmMuHtvyMEd1zrg2ThN#value-number"><code>value</code></a>.</p>                                           |
| <p><strong>public</strong> <a href="/pages/QFXTXHPNCPXbs3aLV955"><strong>greaterThanEvery()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript">primitive value</a> of a child class instance is <strong>greater</strong> than <strong>every</strong> value of the given <a href="/pages/QFXTXHPNCPXbs3aLV955#...values-number"><code>values</code></a>.</p> |
| <p><strong>public</strong> <a href="/pages/kyK3Az0siLQT2Hnbpr8U"><strong>greaterThanSome()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript">primitive value</a> of a child class instance is <strong>greater</strong> than <strong>some</strong> given <a href="/pages/kyK3Az0siLQT2Hnbpr8U#...values-number"><code>values</code></a>.</p>                |
| <p><strong>public</strong> <a href="/pages/PmILNBNZYZXnusd1skO1"><strong>lessThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript">primitive value</a> of a child class instance is <strong>less</strong> than the given <a href="/pages/PmILNBNZYZXnusd1skO1#value-number"><code>value</code></a>.</p>                                                 |
| <p><strong>public</strong> <a href="/pages/EsFliOOJPrEMow3w4PTi"><strong>lessThanEvery()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript">primitive value</a> of a child class instance is <strong>less</strong> than <strong>every</strong> value of the given <a href="/pages/EsFliOOJPrEMow3w4PTi#...values-number"><code>values</code></a>.</p>       |
| <p><strong>public</strong> <a href="/pages/ugE52SDW9tyPAz5WOL9U"><strong>lessThanSome()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript">primitive value</a> of a child class instance is <strong>less</strong> than <strong>some</strong> given <a href="/pages/ugE52SDW9tyPAz5WOL9U#...values-number"><code>values</code></a>.</p>                      |


# greaterThan()

Checks whether the primitive value of a child class is greater than the given value

## `Inequality.prototype.greaterThan()`

Checks whether the [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) of a child class instance is **greater** than the given [`value`](#...values-number).

{% code title="inequality.class.ts" %}

```typescript
public greaterThan(value: number): boolean {
  return this.#greater.than(value);
}
```

{% endcode %}

### Parameters

#### `value:`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

A [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters) of the numbers to test.

### Return type

#### [<mark style="color:green;">`boolean`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#boolean)

### Returns

The **return value** is a [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) indicating whether the [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) of a child class instance is **greater** than the given [`value`](#value-number).

## Example usage

```typescript
// Example usage.
import { Inequality } from '@angular-package/range';

// Define the `Year` class and extend it with `Inequality`.
class Year<Value extends number> extends Inequality<Value> {}

// Initialize `Year`.
const year = new Year(1981);

// Returns Year {1981} of Year<1981>.
year;

// Returns false. 1981 > 1982.
year.greaterThan(1982);

// Returns true. 1981 > 1980.
year.greaterThan(1980);
```


# greaterThanEvery()

Checks whether the primitive value of a child instance is greater than every value of the given values

## `Inequality.prototype.greaterThanEvery()`

Checks whether the [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) of a child class instance is **greater** than **every** value of the given [`values`](#...values-number).

{% code title="inequality.class.ts" %}

```typescript
public greaterThanEvery(...values: number[]): boolean {
  return this.#greater.thanEvery(...values);
}

```

{% endcode %}

### Parameters

#### `...values:`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)`[]`

A [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters) of the numbers to test.

### Return type

#### [<mark style="color:green;">`boolean`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#boolean)

### Returns

The **return value** is a [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) indicating whether the [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) of a child class instance is **greater** than **every** value of the given [`values`](#...values-number).

## Example usage

```typescript
// Example usage.
import { Inequality } from '@angular-package/range';

// Define the `Year` class and extend it with `Inequality`.
class Year<Value extends number> extends Inequality<Value> {}

// Initialize `Year`.
const year = new Year(1981);

// Returns Year {1981} of Year<1981>.
year;

// Returns `true`.
year.greaterThanEvery(1971, 1972, 1972, 1973);

// Returns `false`.
year.greaterThanEvery(1971, 1972, 1972, 1973, 1982);
```


# greaterThanSome()

Checks whether the primitive value of a child instance is greater than some given values

## `Inequality.prototype.greaterThanSome()`

Checks whether the [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) of a child class instance is **greater** than **some** given [`values`](#...values-number).

{% code title="inequality.class.ts" %}

```typescript
public greaterThanSome(...values: number[]): boolean {
  return this.#greater.thanSome(...values);
}
```

{% endcode %}

### Parameters

#### `...values:`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)`[]`

A [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters) of the numbers to test.

### Return type

#### [<mark style="color:green;">`boolean`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#boolean)

### Returns

The **return value** is a [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) indicating whether the [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) of a child class instance is **greater** than **some** given [`values`](#...values-number).&#x20;

## Example usage

```typescript
// Example usage.
import { Inequality } from '@angular-package/range';

// Define the `Year` class and extend it with `Inequality`.
class Year<Value extends number> extends Inequality<Value> {}

// Initialize `Year`.
const year = new Year(1981);

// Returns Year {1981} of Year<1981>.
year;

// Returns `true`.
year.greaterThanSome(1971, 1972, 1972, 1973);

// Returns `true`.
year.greaterThanSome(1971, 1972, 1972, 1973, 1982);
```


# lessThan()

Checks whether the primitive value of a child class is less than the given value

## `Inequality.prototype.lessThan()`

Checks whether the [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) of a child class instance is **less** than the given [`value`](#value-number).

{% code title="inequality.class.ts" %}

```typescript
public lessThan(value: number): boolean {
  return this.#less.than(value);
}
```

{% endcode %}

### Parameters

#### `value:`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

A [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters) of the numbers to test.

### Return type

#### [<mark style="color:green;">`boolean`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#boolean)

### Returns

The **return value** is a [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) indicating whether the [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) of a child class instance is **less** than the given [`value`](#value-number).

## Example usage

```typescript
// Example usage.
import { Inequality } from '@angular-package/range';

// Define the `Year` class and extend it with `Inequality`.
class Year<Value extends number> extends Inequality<Value> {}

// Initialize `Year`.
const year = new Year(1981);

// Returns Year {1981} of Year<1981>.
year;

// Returns `true`. 1981 < 1982.
year.lessThan(1982);

// Returns `false`. 1981 < 1980.
year.lessThan(1980);
```


# lessThanEvery()

Checks whether the primitive value of a child class instance is less than every value of the given values

## `Inequality.prototype.lessThanEvery()`

Checks whether the [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) of a child class instance is **less** than **every** value of the given [`values`](#...values-number).

{% code title="inequality.class.ts" %}

```typescript
public lessThanEvery(...values: number[]): boolean {
  return this.#less.thanEvery(...values);
}
```

{% endcode %}

### Parameters

#### `...values:`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)`[]`

A [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters) of the numbers to test.

### Return type

#### [<mark style="color:green;">`boolean`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#boolean)

### Returns

The **return value** is a [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) indicating whether the [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) of a child class instance is **less** than **every** value of the given [`values`](#...values-number).

## Example usage

```typescript
// Example usage.
import { Inequality } from '@angular-package/range';

// Define the `Year` class and extend it with `Inequality`.
class Year<Value extends number> extends Inequality<Value> {}

// Initialize `Year`.
const year = new Year(1981);

// Returns Year {1981} of Year<1981>.
year;

// Returns `true`
year.lessThanEvery(1982, 1983, 1984, 1985);

// Returns `false`
year.lessThanEvery(1971, 1972, 1972, 1973, 1982);
```


# lessThanSome()

Checks whether the primitive value of a child class is less than some given values

## `Inequality.prototype.lessThanSome()`

Checks whether the [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) of a child class is **less** than **some** given [`values`](#...values-number).

{% code title="inequality.class.ts" %}

```typescript
public greaterThanSome(...values: number[]): boolean {
  return this.#greater.thanSome(...values);
}
```

{% endcode %}

### Parameters

#### `...values:`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)`[]`

A [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters) of the numbers to test.

### Return type

#### [<mark style="color:green;">`boolean`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#boolean)

### Returns

The **return value** is a [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) indicating whether the [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) of a child class instance is **greater** than **some** given [`values`](#...values-number).&#x20;

## Example usage

```typescript
// Example usage.
import { Inequality } from '@angular-package/range';

// Define the `Year` class and extend it with `Inequality`.
class Year<Value extends number> extends Inequality<Value> {}

// Initialize `Year`.
const year = new Year(1981);

// Returns Year {1981} of Year<1981>.
year;

// Returns `true`.
year.lessThanSome(1981, 1982, 1983, 1984, 1985);

// Returns `false`.
year.lessThanSome(1971, 1972, 1972, 1973, 1974);

// Returns `false`.
year.lessThanSome(1971, 1972, 1972, 1973, 1974, 1981);
```


# Overview

The \`Less\` primitive wrapper object

## `Less {}`

The `Less` [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) represents the [primitive value](/draft/less/methods/valueof) of [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) type **less** than the given.

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

### Accessors

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public get</strong> <a href="/pages/U7SCqDXD59rmIkjtBX2w"><strong>[Symbol.</strong><mark style="color:blue;"><strong>toStringTag</strong></mark><strong>](https://range.angular-package.dev/draft/less)</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>'Less'</code> for an instance of <a href="/pages/CMfgRlfJQkYoJNfwfaip"><code>Less</code></a>.</p> |

### Methods

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><strong>public static</strong> <a href="/pages/JKPP2wEfekjwZBYmV4uW#less.create"><strong>create()</strong></a>: <mark style="color:green;">Less</mark><<mark style="color:green;">Value</mark>><br>Creates the <a href="/pages/CMfgRlfJQkYoJNfwfaip"><code>Less</code></a> instance with the given primitive <a href="#value-value"><code>value</code></a>.</p>                                                                                                                                                 |
| <p><strong>public static</strong> <a href="/pages/2IRpr7YX1NVnEcIikVQk"><strong>isLess()</strong></a>: value is <mark style="color:green;">Less</mark><<mark style="color:green;">Value</mark>><br>Checks whether the given <a href="#undefined"><code>value</code></a> is the <a href="/pages/CMfgRlfJQkYoJNfwfaip"><code>Less</code></a> instance of any or given primitive <a href="/pages/2IRpr7YX1NVnEcIikVQk#lessvalue-value">value</a>.</p>                                                                 |
| <p><strong>public</strong> <a href="/pages/Vh59hCRiU95jrcL2bNOY"><strong>than()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/JKCFRuiLu7paenzWw09F">primitive value</a> of a specified <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>object</code></a> is <strong>less</strong> than the given <a href="/pages/Vh59hCRiU95jrcL2bNOY#value-number"><code>value</code></a>.</p>                            |
| <p><strong>public</strong> <a href="/pages/fM9hu8YasNGJp0phTvMy"><strong>thanEvery()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/JKCFRuiLu7paenzWw09F">primitive value</a> of a specified <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>object</code></a> is <strong>less</strong> than <strong>every</strong> value of the given <a href="/pages/fM9hu8YasNGJp0phTvMy"><code>values</code></a>.</p>   |
| <p><strong>public</strong> <a href="/pages/InJaY096epIZx515wnop"><strong>thanSome()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/JKCFRuiLu7paenzWw09F">primitive value</a> of a specified <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>object</code></a> is <strong>less</strong> than <strong>some</strong> given <a href="/pages/InJaY096epIZx515wnop#...values-number"><code>values</code></a>.</p> |
| <p><strong>public</strong> <a href="/pages/JKCFRuiLu7paenzWw09F"><strong>valueOf()</strong></a>: <mark style="color:green;">Value</mark><br>Returns the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf">primitive value</a> of a specified <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>object</code></a>.</p>                                                                                |


# Generic type variables

The \`Less\` primitive wrapper object generic type variables

### `Less<`<mark style="color:green;background-color:green;">`Value`</mark>`>`

#### <mark style="color:green;">`Value`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

​A generic type variable constrained by the [`number`](https://www.typescriptlang.org/docs/handbook/basic-types.html#number), by default of the value **captured** from the supplied [`value`](/draft/greater/constructor#value-value) indicates the [primitive value](/draft/less/methods/valueof) type of a new [`Less`](/draft/less/overview) instance.

{% code title="less.class.ts" %}

```typescript
class Less<
  Value extends number // <--- Declare generic type variable Value.
> extends Number{
  constructor(
    value: Value // <--- Capture generic type variable Value.
  ) {
    super(value);
  }
}
```

{% endcode %}


# ★ Constructor

The \`Less\` primitive wrapper object constructor

## `Less()`

Creates the [`Less`](/draft/less/overview) instance with the given [`value`](#value-value).

{% code title="less.class.ts" %}

```typescript
constructor(value: Value) {
  super(value);
}
```

{% endcode %}

### `Parameters`

#### `value:`[<mark style="color:green;">`Value`</mark>](/draft/less/generic-type-variables#less-less-than-value-greater-than)

The value of generic type variable [`Value`](/draft/less/generic-type-variables#less-less-than-value-greater-than) to set with a new instance.

## Example usage

```typescript
// Example usage.
import { Less } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns Less{390} of Less<390>.
new Less(id);
```


# Accessors

The \`Less\` primitive wrapper object accessors

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public get</strong> <a href="/pages/U7SCqDXD59rmIkjtBX2w"><strong>[Symbol.</strong><mark style="color:blue;"><strong>toStringTag</strong></mark><strong>](https://range.angular-package.dev/draft/less)</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>'Less'</code> for an instance of <a href="/pages/CMfgRlfJQkYoJNfwfaip"><code>Less</code></a>.</p> |


# get \[Symbol.toStringTag]\()

Changes the default tag to 'Less' for an instance

## `[Symbol.toStringTag]`

The [`get`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) accessor, with the help of [`toStringTag`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag), changes the default tag to `'Less'` for an instance of [`Less`](/draft/less/overview).

{% code title="less.class.ts" %}

```typescript
public get [Symbol.toStringTag](): string {
  return 'Less';
}
```

{% endcode %}

### Return type

#### [<mark style="color:green;">`string`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#string)

## Example usage

```typescript
// Example usage.
import { Less } from '@angular-package/range';
import { typeOf } from '@angular-package/type';

// Returns "less".
typeOf(new Less(5));
```


# Methods

The \`Less\` primitive wrapper object accessors methods

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><strong>public static</strong> <a href="/pages/JKPP2wEfekjwZBYmV4uW#less.create"><strong>create()</strong></a>: <mark style="color:green;">Less</mark><<mark style="color:green;">Value</mark>><br>Creates the <a href="/pages/CMfgRlfJQkYoJNfwfaip"><code>Less</code></a> instance with the given primitive <a href="#value-value"><code>value</code></a>.</p>                                                                                                                                                 |
| <p><strong>public static</strong> <a href="/pages/2IRpr7YX1NVnEcIikVQk"><strong>isLess()</strong></a>: value is <mark style="color:green;">Less</mark><<mark style="color:green;">Value</mark>><br>Checks whether the given <a href="#undefined"><code>value</code></a> is the <a href="/pages/CMfgRlfJQkYoJNfwfaip"><code>Less</code></a> instance of any or given primitive <a href="/pages/2IRpr7YX1NVnEcIikVQk#lessvalue-value">value</a>.</p>                                                                 |
| <p><strong>public</strong> <a href="/pages/Vh59hCRiU95jrcL2bNOY"><strong>than()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/JKCFRuiLu7paenzWw09F">primitive value</a> of a specified <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>object</code></a> is <strong>less</strong> than the given <a href="/pages/Vh59hCRiU95jrcL2bNOY#value-number"><code>value</code></a>.</p>                            |
| <p><strong>public</strong> <a href="/pages/fM9hu8YasNGJp0phTvMy"><strong>thanEvery()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/JKCFRuiLu7paenzWw09F">primitive value</a> of a specified <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>object</code></a> is <strong>less</strong> than <strong>every</strong> value of the given <a href="/pages/fM9hu8YasNGJp0phTvMy"><code>values</code></a>.</p>   |
| <p><strong>public</strong> <a href="/pages/InJaY096epIZx515wnop"><strong>thanSome()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/JKCFRuiLu7paenzWw09F">primitive value</a> of a specified <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>object</code></a> is <strong>less</strong> than <strong>some</strong> given <a href="/pages/InJaY096epIZx515wnop#...values-number"><code>values</code></a>.</p> |
| <p><strong>public</strong> <a href="/pages/JKCFRuiLu7paenzWw09F"><strong>valueOf()</strong></a>: <mark style="color:green;">Value</mark><br>Returns the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf">primitive value</a> of a specified <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object"><code>object</code></a>.</p>                                                                                |


# static create()

Creates the Less instance with the given primitive value

## `Less.create()`

Creates the [`Less`](/draft/less/overview) instance with the given primitive [`value`](#value-value).

{% code title="less.class.ts" %}

```typescript
public static create<Value extends number>(value: Value): Less<Value> {
  return new this(value);
}
```

{% endcode %}

### Generic type variables

#### <mark style="color:green;">`Value`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

A generic type variable indicates captured type of the supplied [`value`](#value-value) via the [return type](#return-type).

### Parameters

#### `value:`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)

The value of generic type variable [`Value`](#valueextendsnumber) to set with a newly created instance.

### Return type

#### `Less<`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)`>`

The **return type** is the [`Less`](/draft/less/overview) [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) that takes the generic type variable [`Value`](#valueextendsnumber).

### Returns

The **return value** is the [`Less`](/draft/less/overview) instance with the [primitive value](https://range.angular-package.dev/draft/less/methods/pages/JKCFRuiLu7paenzWw09F#less.prototype.valueof) of the given [`value`](#value-value).

## Example usage

```typescript
// Example usage.
import { Greater } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns Less {390} of Less<390>.
Less.create(id);
```


# static isLess()

Checks whether the given value is the Less instance of any or given primitive value

## `Less.isLess()`

Checks whether the given [`value`](#undefined) is the [`Less`](/draft/less/overview) instance of any or given primitive [value](#lessvalue-value).

{% code title="less.class.ts" %}

```typescript
public static isLess<Value extends number>(
  value: any,
  lessValue?: Value
): value is Less<Value> {
  return (
    typeof value === 'object' &&
    value instanceof this &&
    (typeof lessValue === 'number' ? value.valueOf() === lessValue : true)
  );
}
```

{% endcode %}

### Generic type variables

#### <mark style="color:green;">`Value`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

A generic type variable indicates captured type of the supplied [`lessValue`](#lessvalue-value) via the [return type](#return-type).

### Parameters

#### `value:`[<mark style="color:green;">`any`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#any)

The value of [`any`](https://www.typescriptlang.org/docs/handbook/basic-types.html#any) type to test against the [`Less`](/draft/less/overview) instance.

#### `lessValue:`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)

An optional value of generic type variable [`Value`](#valueextendsnumber) to check whether it's the primitive value of the given [`value`](#value-any).

### Return type

#### `Lees<`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)`>`

The **return type** is a [`boolean`](https://www.typescriptlang.org/docs/handbook/basic-types.html#boolean) resulting from its statement indicating the [`value`](#value-any) is the [`Less`](/draft/less/overview) object that takes the generic type variable [`Value`](#valueextendsnumber).

### Returns

The **return value** is a [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) indicating whether the given [`value`](#value-any) is the [`Less`](/draft/less/overview) instance of any or given [primitive value](#lessvalue-value).

## Example usage

```typescript
// Example usage.
import { Less } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns Less {390} of Less<390>.
const id390 = Less.create(id);

// Returns `true`.
Less.isLess(id390);

// Returns `false`.
Less.isLess(id390, 381);

// Returns `true`.
Less.isLess(id390, 390);
```


# than()

Checks whether the primitive value of a specified object is less than the given value

## `Less.prototype.than()`

Checks whether the [primitive value](/draft/less/methods/valueof) of a specified [`object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) is **less** than the given [`value`](#value-number).

{% code title="less.class.ts" %}

```typescript
public than(value: number): boolean {
  return typeof value === 'number' ? this.valueOf() < value : false;
}
```

{% endcode %}

### Parameters

#### `value:`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

The value of [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) type to test.

### Return type

#### [<mark style="color:green;">`boolean`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#boolean)

### Returns

The **return value** is a [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) indicating whether the [primitive value](/draft/less/methods/valueof) is **less** than the given [`value`](#value-number).

## Example usage

```typescript
// Example usage.
import { Less } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns `false`.
new Less(id).than(389);

// Returns `false`.
new Less(id).than(390);

// Returns `true`.
new Less(id).than(391);
```


# thanEvery()

Checks whether the primitive value of a specified object is less than every value of the given values

## `Less.prototype.thanEvery()`

Checks whether the [primitive value](/draft/less/methods/valueof) of a specified [`object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) is **less** than **every** value of the given [`values`](#...values-number).

{% code title="less.class.ts" %}

```typescript
public thanEvery(...values: number[]): boolean {
  return Array.isArray(values)
    ? values.every((value) => this.valueOf() < value)
    : false;
}
```

{% endcode %}

### Parameters

#### `...values:`[<mark style="color:green;">`number`</mark>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)`[]`

A [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters) of the numbers to test.

### Return type

#### [<mark style="color:green;">`boolean`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#boolean)

### Returns

The **return value** is a [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) indicating whether the [primitive value](/draft/less/methods/valueof) is **less** than **every** value of the given [`values`](#...values-number).

## Example usage

```typescript
// Example usage.
import { Less } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns `false`.
new Less(id).thanEvery(387, 388, 390);

// Returns `true`.
new Less(id).thanEvery(393, 392, 394, 391);
```


# thanSome()

Checks whether the primitive value of a specified object is less than some given values.

## `Less.prototype.thanSome()`

Checks whether the [primitive value](/draft/less/methods/valueof) of a specified [`object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) is **less** than **some** given [`values`](#...values-number).

{% code title="less.class.ts" %}

```typescript
public thanSome(...values: number[]): boolean {
  return Array.isArray(values)
    ? values.some((value) => this.valueOf() < value)
    : false;
}
```

{% endcode %}

### Parameters

#### `...values:`[<mark style="color:green;">`number`</mark>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)`[]`

A [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters) of the numbers to test.

### Return type

#### [<mark style="color:green;">`boolean`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#boolean)

### Returns

The **return value** is a [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) indicating whether the [primitive value](/draft/less/methods/valueof) is **less** than **some** given [`values`](#...values-number).

## Example usage

```typescript
// Example usage.
import { Less } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns `false`.
new Less(id).thanSome(387, 388, 390);

// Returns `true`.
new Less(id).thanSome(387, 388, 389, 391);
```


# valueOf()

Returns the primitive value of a specified object

## `Less.prototype.valueOf()`

Returns the [primitive value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf) of a specified object.

{% embed url="<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf>" %}

{% code title="less.class.ts" %}

```typescript
public valueOf(): Value {
  return super.valueOf() as any;
}
```

{% endcode %}

### Return type

#### [<mark style="color:green;">`Value`</mark>](/draft/less/generic-type-variables)

### Returns

The **return value** is the [primitive value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf) of generic type variable [`Value`](/draft/less/generic-type-variables#less-less-than-value-greater-than).

## Example usage

```typescript
// Example usage.
import { Less } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns 390 of type 390.
new Less(id).valueOf();
```


# Example usage


# Overview

The \`Maximum\` primitive wrapper object

## `Maximum {}`

The `Maximum` [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) extended by the [`Inequality`](/draft/inequality/overview) abstract [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) represents the maximum [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) **greater** or **less** than the given.

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

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

### Accessors

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><strong>public get</strong> <a href="/pages/GvCNvlfxIPxbZU9tsr3e"><strong>[Symbol.</strong><mark style="color:blue;"><strong>toStringTag</strong></mark><strong>](https://range.angular-package.dev/draft/maximum)</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>'Maximum'</code> for an instance of <a href="/pages/FsmzzwAsU4wnhzR6Owkf"><code>Maximum</code></a>.</p> |

### Methods

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public static</strong> <a href="/pages/yupQZAAQyCvfyVjJtjIi"><strong>create()</strong></a>: <mark style="color:green;">Maximum</mark><<mark style="color:green;">Value</mark>><br>Creates the <a href="/pages/FsmzzwAsU4wnhzR6Owkf"><code>Maximum</code></a> instance with the given primitive <a href="/pages/yupQZAAQyCvfyVjJtjIi#maximum.create"><code>value</code></a>.</p>                                                                                             |
| <p><strong>public static</strong> <a href="/pages/EQF3GFfVH5ReKJ0a4Gk9#maximum.ismaximum"><strong>isMaximum()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the value of <a href="https://www.typescriptlang.org/docs/handbook/basic-types.html#any"><code>any</code></a> type is the <a href="/pages/FsmzzwAsU4wnhzR6Owkf"><code>Maximum</code></a> instance of any or the given primitive <a href="/pages/EQF3GFfVH5ReKJ0a4Gk9#value-any">value</a>.</p> |
| <p><strong>public</strong> <a href="/pages/cQeUkF2Fkx0vAOXl7QtX#maximum.prototype.valueof"><strong>valueOf()</strong></a>: <mark style="color:green;">Value</mark><br>Returns the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf">primitive value</a> of a specified <a href="/pages/FsmzzwAsU4wnhzR6Owkf"><code>Maximum</code></a> object.</p>                                                                              |


# Generic type variables

The \`Maximum\` primitive wrapper object generic type variables

### `Maximum<`<mark style="color:green;background-color:green;">`Value`</mark>`>`

#### <mark style="color:green;">`Value`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

​A generic type variable constrained by the [`number`](https://www.typescriptlang.org/docs/handbook/basic-types.html#number), by default of the value **captured** from the supplied [`value`](/draft/greater/constructor#value-value) indicates the [primitive value](/draft/less/methods/valueof) type of a new [`Maximum`](/draft/maximum/overview) instance.

{% code title="maximum.class.ts" %}

```typescript
class Maximum<
  Value extends number // <--- Declare generic type variable Value.
> extends Inequality<Value> {
  constructor(
    value: Value // <--- Capture generic type variable Value.
  ) {
    super(value);
  }
}
```

{% endcode %}


# ★ Constructor

Creates the Maximum instance of the given primitive value

## `Maximum()`

Creates the [`Maximum`](/draft/maximum/overview) instance of the given primitive [`value`](#value-value).

{% code title="maximum.class.ts" %}

```typescript
constructor(value: Value) {
  super(value);
}
```

{% endcode %}

### `Parameters`

#### `value:`[<mark style="color:green;">`Value`</mark>](/draft/maximum/generic-type-variables#maximum-less-than-value-greater-than)

The value of the generic type variable [`Value`](/draft/maximum/generic-type-variables#maximum-less-than-value-greater-than) is the primitive value of the new instance.

## Example usage

```typescript
// Example usage.
import { Maximum } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns Maximum {390} of Maximum<390>.
new Maximum(id);
```


# Accessors

The \`Maximum\` primitive wrapper object accessors

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><strong>public get</strong> <a href="/pages/GvCNvlfxIPxbZU9tsr3e"><strong>[Symbol.</strong><mark style="color:blue;"><strong>toStringTag</strong></mark><strong>](https://range.angular-package.dev/draft/maximum)</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>'Maximum'</code> for an instance of <a href="/pages/FsmzzwAsU4wnhzR6Owkf"><code>Maximum</code></a>.</p> |


# get \[Symbol.toStringTag]\()

Changes the default tag to 'Maximum' for an instance

## `[Symbol.toStringTag]`

The [`get`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) accessor, with the help of [`toStringTag`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag), changes the default tag to `'Maximum'` for an instance of [`Maximum`](/draft/maximum/overview).

{% code title="maximum.class.ts" %}

```typescript
public get [Symbol.toStringTag](): string {
  return 'Maximum';
}
```

{% endcode %}

### Return type

#### [<mark style="color:green;">`string`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#string)

## Example usage

```typescript
// Example usage.
import { Maximum } from '@angular-package/range';
import { typeOf } from '@angular-package/type';

// Returns "maximum".
typeOf(new Maximum(5));
```


# Methods

The \`Maximum\` primitive wrapper object methods

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public static</strong> <a href="/pages/yupQZAAQyCvfyVjJtjIi"><strong>create()</strong></a>: <mark style="color:green;">Maximum</mark><<mark style="color:green;">Value</mark>><br>Creates the <a href="/pages/FsmzzwAsU4wnhzR6Owkf"><code>Maximum</code></a> instance with the given primitive <a href="/pages/yupQZAAQyCvfyVjJtjIi#maximum.create"><code>value</code></a>.</p>                                                                                             |
| <p><strong>public static</strong> <a href="/pages/EQF3GFfVH5ReKJ0a4Gk9#maximum.ismaximum"><strong>isMaximum()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the value of <a href="https://www.typescriptlang.org/docs/handbook/basic-types.html#any"><code>any</code></a> type is the <a href="/pages/FsmzzwAsU4wnhzR6Owkf"><code>Maximum</code></a> instance of any or the given primitive <a href="/pages/EQF3GFfVH5ReKJ0a4Gk9#value-any">value</a>.</p> |
| <p><strong>public</strong> <a href="/pages/cQeUkF2Fkx0vAOXl7QtX#maximum.prototype.valueof"><strong>valueOf()</strong></a>: <mark style="color:green;">Value</mark><br>Returns the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf">primitive value</a> of a specified <a href="/pages/FsmzzwAsU4wnhzR6Owkf"><code>Maximum</code></a> object.</p>                                                                              |


# static create()

Creates the Maximum instance with the given primitive value

## `Maximum.create()`

Creates the [`Maximum`](/draft/maximum/overview) instance with the given primitive [`value`](#value-value).

{% code title="maximum.class.ts" %}

```typescript
public static define<Value extends number>(value: Value): Maximum<Value> {
  return new this(value);
}
```

{% endcode %}

### Generic type variables

#### <mark style="color:green;">`Value`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

A generic type variable indicates captured type of the supplied [`value`](#value-value) via the [return type](#return-type).

### Parameters

#### `value:`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)

The maximum number of generic type variable [`Value`](#valueextendsnumber) to set with a new instance.

### Return type

#### `Maximum<`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)`>`

The **return type** is the [`Maximum`](/draft/maximum/overview) [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) that takes the generic type variable [`Value`](#valueextendsnumber).

### Returns

The **return value** is the [`Maximum`](/draft/maximum/overview) instance of any or the given primitive [`value`](#value-value).

## Example usage

```typescript
// Example usage.
import { Maximum } from '@angular-package/range';

// Returns Maximum {27} of Maximum<27>.
Maximum.create(27);
```


# static isMaximum()

Checks whether the value of any type is the Maximum instance of any or the given primitive value

## `Maximum.isMaximum()`

Checks whether the value of [`any`](https://www.typescriptlang.org/docs/handbook/basic-types.html#any) type is the [`Maximum`](/draft/maximum/overview) instance of any or the given primitive [value](#max-value).

{% code title="maximum.class.ts" %}

```typescript
public static isMaximum<Value extends number>(
  value: any,
  max?: Value
): value is Maximum<Value> {
  return (
    typeof value === 'object' &&
    value instanceof this &&
    (typeof max === 'number' ? value.valueOf() === max : true)
  );
}
```

{% endcode %}

### Generic type variables

#### <mark style="color:green;">`Value`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

A generic type variable indicates captured type of the supplied [`max`](#max-value) via the [return type](#return-type).

### Parameters

#### `value:`[<mark style="color:green;">`any`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#any)

The value of [`any`](https://www.typescriptlang.org/docs/handbook/basic-types.html#any) type to test against the [`Maximum`](/draft/maximum/overview) instance.

#### `max?:`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)

Optional maximum of the generic type variable [`Value`](#valueextendsnumber) to check if it's the primitive value of the given [`value`](#value-any).

### Return type

#### `value is Maximum<`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)`>`

The **return type** is a [`boolean`](https://www.typescriptlang.org/docs/handbook/basic-types.html#boolean) resulting from its statement indicating the [`value`](#value-any) is the [`Maximum`](/draft/maximum/overview) object that takes the generic type variable [`Value`](#valueextendsnumber).

### Returns

The **return value** is a [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) indicating whether the provided value is an instance of [`Maximum`](/draft/maximum/overview).

### Example usage

```typescript
// Example usage.
import { Maximum } from '@angular-package/range';


```


# valueOf()

Returns the primitive value of a specified Maximum object

## `Maximum.prototype.valueOf()`

Returns the [primitive value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf) of a specified [`Maximum`](/draft/maximum/overview) object.

{% embed url="<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf>" %}

{% code title="maximum.class.ts" %}

```typescript
public valueOf(): Value {
  return super.valueOf() as Value;
}
```

{% endcode %}

### Return type

#### [<mark style="color:green;">`Value`</mark>](/draft/maximum/generic-type-variables#maximum-less-than-value-greater-than)

### Returns

The **return value** is the [primitive value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf) of generic type variable [`Value`](/draft/maximum/generic-type-variables#maximum-less-than-value-greater-than).

## Example usage

```typescript
// Example usage.
import { Maximum } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns 390 of type 390.
new Maximum(id).valueOf();
```


# Overview

The \`Minimum\` primitive wrapper object

## `Minimum {}`

The `Minimum` [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) extended by the [`Inequality`](/draft/inequality/overview) abstract primitive wrapper [`object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) represents the minimum [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) **greater** or **less** than the given.

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

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

### Accessors

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><strong>public get</strong> <a href="/pages/Ca1EUQ1wZu457FrsyJWC"><strong>[Symbol.</strong><mark style="color:blue;"><strong>toStringTag</strong></mark><strong>](https://range.angular-package.dev/draft/minimum)</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>'Minimum'</code> for an instance of <a href="/pages/hVzjtjutjQy5nmHoH46a"><code>Minimum</code></a>.</p> |

### Methods

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public static</strong> <a href="/pages/OOFeJlbLqSaqadqt7Uwg#minimum.create"><strong>create()</strong></a>: <mark style="color:green;">Maximum</mark><<mark style="color:green;">Value</mark>><br>Creates the <a href="/pages/hVzjtjutjQy5nmHoH46a"><code>Minimum</code></a> instance with the given primitive <a href="/pages/OOFeJlbLqSaqadqt7Uwg#value-value"><code>value</code></a>.</p>                                                                                                                                                              |
| <p><strong>public static</strong> <a href="/pages/IOh7ysKtxQZLMh5vosXu#minimum.isminimum"><strong>isMinimum()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks the provided <a href="/pages/IOh7ysKtxQZLMh5vosXu#value-any"><code>value</code></a> of <a href="https://www.typescriptlang.org/docs/handbook/basic-types.html#any"><code>any</code></a> type whether is an instance of <a href="/pages/hVzjtjutjQy5nmHoH46a"><code>Minimum</code></a> of any or the given <a href="/pages/IOh7ysKtxQZLMh5vosXu#min-value"><code>min</code></a>.</p> |
| <p><strong>public</strong> <a href="/pages/EVBRc6yvosmzogLoQiK2#minimum.prototype.valueof"><strong>valueOf()</strong></a>: <mark style="color:green;">Value</mark><br>Returns the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf">primitive value</a> of the generic type variable <a href="/pages/zwSOF371V4BuYSMaHzUv#minimum-less-than-value-greater-than"><code>Value</code></a> of the specified <a href="/pages/hVzjtjutjQy5nmHoH46a"><code>Minimum</code></a> object.</p>                          |


# Generic type variables

The \`Minimum\` primitive wrapper object generic type variables

### `Minimum<`<mark style="color:green;background-color:green;">`Value`</mark>`>`

#### <mark style="color:green;">`Value`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

​A generic type variable constrained by the [`number`](https://www.typescriptlang.org/docs/handbook/basic-types.html#number), by default of the value **captured** from the supplied [`value`](/draft/minimum/constructor#value-value) indicates the [primitive value](/draft/less/methods/valueof) type of a new [`Minimum`](/draft/minimum/overview) instance.

{% code title="minimum.class.ts" %}

```typescript
class Minimum<
  Value extends number // <--- Declare generic type variable Value.
> extends Inequality<Value> {
  constructor(
    value: Value // <--- Capture generic type variable Value.
  ) {
    super(value);
  }
}
```

{% endcode %}


# ★ Constructor

The \`Minimum\` primitive wrapper object constructor

## `Minimum()`

Creates the [`Minimum`](/draft/minimum/overview) instance of the given primitive [`value`](#value-value).

{% code title="minimum.class.ts" %}

```typescript
constructor(value: Value) {
  super(value);
}
```

{% endcode %}

### `Parameters`

#### `value:`[<mark style="color:green;">`Value`</mark>](/draft/minimum/generic-type-variables#minimum-less-than-value-greater-than)

The value of the generic type variable [`Value`](/draft/minimum/generic-type-variables#minimum-less-than-value-greater-than) is the primitive value of the new instance.

## Example usage

```typescript
// Example usage.
import { Minimum } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns Minimum {390} of Minimum<390>.
new Minimum(id);
```


# Accessors

The \`Minimum\` primitive wrapper object accessors

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><strong>public get</strong> <a href="/pages/Ca1EUQ1wZu457FrsyJWC"><strong>[Symbol.</strong><mark style="color:blue;"><strong>toStringTag</strong></mark><strong>](https://range.angular-package.dev/draft/minimum)</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>'Minimum'</code> for an instance of <a href="/pages/hVzjtjutjQy5nmHoH46a"><code>Minimum</code></a>.</p> |


# get \[Symbol.toStringTag]\()

The get accessor, with the help of toStringTag, changes the default tag to 'Minimum' for an instance of Minimum

## `[Symbol.toStringTag]`

The [`get`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) accessor, with the help of [`toStringTag`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag), changes the default tag to `'Minimum'` for an instance of [`Minimum`](/draft/minimum/overview).

{% code title="minimum.class.ts" %}

```typescript
public get [Symbol.toStringTag](): string {
  return 'Minimum';
}
```

{% endcode %}

### Return type

#### [<mark style="color:green;">`string`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#string)

## Example usage

```typescript
// Example usage.
import { Minimum } from '@angular-package/range';
import { typeOf } from '@angular-package/type';

// Returns "minimum".
typeOf(new Minimum(5));
```


# Methods

The \`Minimum\` primitive wrapper object methods

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public static</strong> <a href="/pages/OOFeJlbLqSaqadqt7Uwg#minimum.create"><strong>create()</strong></a>: <mark style="color:green;">Minimum</mark><<mark style="color:green;">Value</mark>><br>Creates the <a href="/pages/hVzjtjutjQy5nmHoH46a"><code>Minimum</code></a> instance with the given primitive <a href="/pages/OOFeJlbLqSaqadqt7Uwg#value-value"><code>value</code></a>.</p>                                                                                                                                                              |
| <p><strong>public static</strong> <a href="/pages/IOh7ysKtxQZLMh5vosXu#minimum.isminimum"><strong>isMinimum()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks the provided <a href="/pages/IOh7ysKtxQZLMh5vosXu#value-any"><code>value</code></a> of <a href="https://www.typescriptlang.org/docs/handbook/basic-types.html#any"><code>any</code></a> type whether is an instance of <a href="/pages/hVzjtjutjQy5nmHoH46a"><code>Minimum</code></a> of any or the given <a href="/pages/IOh7ysKtxQZLMh5vosXu#min-value"><code>min</code></a>.</p> |
| <p><strong>public</strong> <a href="/pages/EVBRc6yvosmzogLoQiK2#minimum.prototype.valueof"><strong>valueOf()</strong></a>: <mark style="color:green;">Value</mark><br>Returns the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf">primitive value</a> of the generic type variable <a href="/pages/zwSOF371V4BuYSMaHzUv#minimum-less-than-value-greater-than"><code>Value</code></a> of the specified <a href="/pages/hVzjtjutjQy5nmHoH46a"><code>Minimum</code></a> object.</p>                          |


# static create()

Creates the Minimum instance with the given primitive value

## `Minimum.create()`

The static `create()` method creates the [`Minimum`](/draft/minimum/overview) instance with the given primitive [`value`](#value-value).

{% code title="minimum.class.ts" %}

```typescript
public static create<Value extends number>(value: Value): Minimum<Value> {
  return new this(value);
}
```

{% endcode %}

### Generic type variables

#### <mark style="color:green;">`Value`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

A generic type variable indicates captured type of the supplied [`value`](#value-value) via the [return type](#return-type).

### Parameters

#### `value:`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)

The minimum number of generic type variable [`Value`](#valueextendsnumber) to set with a new instance.

### Return type

#### `Minimum<`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)`>`

The **return type** is the [`Minimum`](/draft/minimum/overview) [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) that takes the generic type variable [`Value`](#valueextendsnumber).

### Returns

The **return value** is the [`Minimum`](/draft/minimum/overview) instance with the [primitive value](https://range.angular-package.dev/draft/minimum/methods/pages/EVBRc6yvosmzogLoQiK2#minimum.prototype.valueof) of the given [`value`](#value-value).

## Example usage

```typescript
// Example usage.
import { Minimum } from '@angular-package/range';

// Returns Minimum {27} of Minimum<27>.
Minimum.create(27);
```


# static isMinimum()

Checks whether the value of any type is the Maximum instance of any or the given primitive value

## `Minimum.isMinimum()`

The static `isMinimum()` method checks the provided [`value`](#value-any) of [`any`](https://www.typescriptlang.org/docs/handbook/basic-types.html#any) type whether is an instance of [`Minimum`](/draft/minimum/overview) of any or the given [`min`](#min-value).

{% code title="minimum.class.ts" %}

```typescript
public static isMinimum<Value extends number>(
  value: any,
  min?: Value
): value is Minimum<Value> {
  return (
    typeof value === 'object' &&
    value instanceof this &&
    (typeof min === 'number' ? value.valueOf() : true)
  );
}
```

{% endcode %}

### Generic type variables

#### <mark style="color:green;">`Value`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

A generic type variable indicates captured type of the supplied [`min`](#max-value) via the [return type](#return-type).

### Parameters

#### `value:`[<mark style="color:green;">`any`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#any)

The value of [`any`](https://www.typescriptlang.org/docs/handbook/basic-types.html#any) type to test against the [`Minimum`](/draft/minimum/overview) instance.

#### `min?:`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)

Optional minimum of the generic type variable [`Value`](#valueextendsnumber) to check if it's the [primitive value](https://range.angular-package.dev/draft/minimum/methods/pages/EVBRc6yvosmzogLoQiK2#minimum.prototype.valueof) of the given [`value`](#value-any).

### Return type

#### `value is Minimum<`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)`>`

The **return type** is a [`boolean`](https://www.typescriptlang.org/docs/handbook/basic-types.html#boolean) resulting from its statement indicating the [`value`](#value-any) is the [`Minimum`](/draft/minimum/overview) object that takes the generic type variable [`Value`](#valueextendsnumber).

### Returns

The **return value** is a [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) indicating whether the provided [`value`](#value-any) is an instance of [`Minimum`](/draft/minimum/overview) of any or the given [`min`](#min-value).

## Example usage

```typescript
// Example usage.
import { Minimum } from '@angular-package/range';


```


# valueOf()

Returns the primitive value of a specified Minimum object

## `Minimum.prototype.valueOf()`

The `valueOf()` method returns the [primitive value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf) of the generic type variable [`Value`](/draft/minimum/generic-type-variables#minimum-less-than-value-greater-than) of the specified [`Minimum`](/draft/minimum/overview) object.

{% embed url="<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf>" %}

{% code title="minimum.class.ts" %}

```typescript
public valueOf(): Value {
  return super.valueOf() as Value;
}
```

{% endcode %}

### Return type

#### [<mark style="color:green;">`Value`</mark>](/draft/minimum/generic-type-variables#minimum-less-than-value-greater-than)

### Returns

The **return value** is the [primitive value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf) of generic type variable [`Value`](/draft/minimum/generic-type-variables#minimum-less-than-value-greater-than).

## Example usage

```typescript
// Example usage.
import { Minimum } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns 390 of type 390.
new Minimum(id).valueOf();
```


# Overview

The \`Number\` primitive wrapper object

## `Number {}`

The `Number` [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) extended by the [`Inequality`](/draft/inequality/overview) abstract primitive wrapper [`object`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) represents the [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) **greater** or **less** than the given.

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

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

### Methods

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public static</strong> <a href="/pages/7wmyjXTDK3H3oehscAwm#number.create"><strong>create()</strong></a>: <mark style="color:green;">Number</mark><<mark style="color:green;">Value</mark>><br>Creates the <a href="/pages/H2YvwYvv80xnkKHZVSKv"><code>Number</code></a> instance with the given primitive <a href="/pages/7wmyjXTDK3H3oehscAwm#value-value"><code>value</code></a></p>                                                                                                                                                                     |
| <p><strong>public static</strong> <a href="/pages/NYYbByDuRIxzL6fTy5JM#number.isnumber"><strong>isNumber()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks the provided <a href="/pages/NYYbByDuRIxzL6fTy5JM#value-any"><code>value</code></a> of <a href="https://www.typescriptlang.org/docs/handbook/basic-types.html#any"><code>any</code></a> type whether is an instance of <a href="/pages/H2YvwYvv80xnkKHZVSKv"><code>Number</code></a> of any or the given primitive <a href="/pages/NYYbByDuRIxzL6fTy5JM#numbervalue-value">value</a>.</p> |
| <p><strong>public</strong> <a href="/pages/NR8vwPX9prnPFxrqsjGv#number.prototype.valueof"><strong>valueOf()</strong></a>: <mark style="color:green;">Value</mark><br>Returns the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf">primitive value</a> of the generic type variable <a href="/pages/mc3quasq5243lwMHQ6tc#number-less-than-value-greater-than"><code>Value</code></a> of the specified <a href="#number"><code>Number</code></a> object.</p>                                                    |


# Generic type variables

The \`Number\` primitive wrapper object generic type variables

### `Number<`<mark style="color:green;background-color:green;">`Value`</mark>`>`

#### <mark style="color:green;">`Value`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

​A generic type variable constrained by the [`number`](https://www.typescriptlang.org/docs/handbook/basic-types.html#number), by default of the value **captured** from the supplied [`value`](/draft/number/constructor#value-value) indicates the [primitive value](https://range.angular-package.dev/draft/number/pages/NR8vwPX9prnPFxrqsjGv#number.prototype.valueof) type of a new [`Number`](/draft/number/overview) instance.

{% code title="number.class.ts" %}

```typescript
class Number<
  Value extends number // <--- Declare generic type variable Value.
> extends Inequality<Value> {
  constructor(
    value: Value // <--- Capture generic type variable Value.
  ) {
    super(value);
  }
}
```

{% endcode %}


# ★ Constructor

The \`Number\` primitive wrapper constructor

## `Number()`

Creates the [`Number`](/draft/number/overview) instance of the given primitive [`value`](#value-value).

{% code title="number.class.ts" %}

```typescript
constructor(value: Value) {
  super(value);
}
```

{% endcode %}

### `Parameters`

#### `value:`[<mark style="color:green;">`Value`</mark>](/draft/minimum/generic-type-variables#minimum-less-than-value-greater-than)

The value of the generic type variable [`Value`](/draft/number/generic-type-variables#number-less-than-value-greater-than) is the primitive value of the new instance.

## Example usage

```typescript
// Example usage.
import { Number } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns Number {390} of Number<390>.
new Number(id);
```


# Methods

The \`Number\` primitive wrapper object methods

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public static</strong> <a href="/pages/7wmyjXTDK3H3oehscAwm#number.create"><strong>create()</strong></a>: <mark style="color:green;">Number</mark><<mark style="color:green;">Value</mark>><br>Creates the <a href="/pages/H2YvwYvv80xnkKHZVSKv"><code>Number</code></a> instance with the given primitive <a href="/pages/7wmyjXTDK3H3oehscAwm#value-value"><code>value</code></a></p>                                                                                                                                                                     |
| <p><strong>public static</strong> <a href="/pages/NYYbByDuRIxzL6fTy5JM#number.isnumber"><strong>isNumber()</strong></a>: <mark style="color:green;">boolean</mark><br>checks the provided <a href="/pages/NYYbByDuRIxzL6fTy5JM#value-any"><code>value</code></a> of <a href="https://www.typescriptlang.org/docs/handbook/basic-types.html#any"><code>any</code></a> type whether is an instance of <a href="/pages/H2YvwYvv80xnkKHZVSKv"><code>Number</code></a> of any or the given primitive <a href="/pages/NYYbByDuRIxzL6fTy5JM#numbervalue-value">value</a>.</p> |
| <p><strong>public</strong> <a href="/pages/NR8vwPX9prnPFxrqsjGv#number.prototype.valueof"><strong>valueOf()</strong></a>: <mark style="color:green;">Value</mark><br>Returns the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf">primitive value</a> of the generic type variable <a href="/pages/mc3quasq5243lwMHQ6tc#number-less-than-value-greater-than"><code>Value</code></a> of the specified <a href="#number"><code>Number</code></a> object.</p>                                                    |


# static create()

Creates the \`Number\` instance with the given primitive value

## `Number.create()`

The static `create()` method creates the [`Number`](/draft/number/overview) instance with the given primitive [`value`](#value-value).

{% code title="number.class.ts" %}

```typescript
public static create<Value extends number>(value: Value): Number<Value> {
  return new this(value);
}
```

{% endcode %}

### Generic type variables

#### <mark style="color:green;">`Value`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

A generic type variable indicates captured type of the supplied [`value`](#value-value) via the [return type](#return-type).

### Parameters

#### `value:`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)

The number of generic type variable [`Value`](#valueextendsnumber) to set with a new instance.

### Return type

#### [<mark style="color:green;">`Number`</mark>](/draft/number/overview)`<`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)`>`

The **return type** is the [`Number`](/draft/number/overview) [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) that takes the generic type variable [`Value`](#valueextendsnumber).

### Returns

The **return value** is the [`Number`](/draft/number/overview) instance with the [primitive value](https://range.angular-package.dev/draft/number/methods/pages/NR8vwPX9prnPFxrqsjGv#number.prototype.valueof) of the given [`value`](#value-value).

## Example usage

```typescript
// Example usage.
import { Number } from '@angular-package/range';

// Returns Number {27} of Number<27>.
Number.create(27);
```


# static isNumber()

Checks the provided value of any type whether is an instance of \`Number\` of any or the given primitive value

## `Number.isNumber()`

The static `isNumber()` method checks the provided [`value`](#value-any) of [`any`](https://www.typescriptlang.org/docs/handbook/basic-types.html#any) type whether is an instance of [`Number`](/draft/number/overview) of any or the given primitive [value](#numbervalue-value).

{% code title="number.class.ts" %}

```typescript
public static isNumber<Value extends number>(
  value: any,
  numberValue?: Value
): value is Number<Value> {
  return (
    typeof value === 'object' &&
    value instanceof this &&
    (typeof numberValue === 'number' ? value.valueOf() === numberValue : true)
  );
}
```

{% endcode %}

### Generic type variables

#### <mark style="color:green;">`Value`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

A generic type variable indicates captured type of the supplied [`numberValue`](#numbervalue-value) via the [return type](#return-type).

### Parameters

#### `value:`[<mark style="color:green;">`any`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#any)

The value of [`any`](https://www.typescriptlang.org/docs/handbook/basic-types.html#any) type to test against the [`Number`](/draft/number/overview) instance.

#### `numberValue?:`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)

Optional number of the generic type variable [`Value`](#valueextendsnumber) to check if it's the [primitive value](https://range.angular-package.dev/draft/number/methods/pages/NR8vwPX9prnPFxrqsjGv#number.prototype.valueof) of the given [`value`](#value-any).

### Return type

#### `value is Number<`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)`>`

The **return type** is a [`boolean`](https://www.typescriptlang.org/docs/handbook/basic-types.html#boolean) resulting from its statement indicating the [`value`](#value-any) is the [`Number`](/draft/number/overview) object that takes the generic type variable [`Value`](#valueextendsnumber).

### Returns

The **return value** is a [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) indicating whether the provided [`value`](#value-any) is an instance of [`Number`](/draft/number/overview) of any or the given [<mark style="background-color:purple;">`numberValue`</mark>](#numbervalue-value).

## Example usage

```typescript
// Example usage.
import { Number } from '@angular-package/range';


```


# valueOf()

Returns the primitive value of the generic type variable \`Value\` of the specified \`Number\` object

## `Number.prototype.valueOf()`

The `valueOf()` method returns the [primitive value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf) of the generic type variable [`Value`](/draft/number/generic-type-variables#number-less-than-value-greater-than) of the specified [`Number`](/draft/number/overview) object.

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

{% embed url="<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf>" %}
`String.prototype.valueOf()`
{% endembed %}

{% code title="number.class.ts" %}

```typescript
public valueOf(): Value {
  return super.valueOf() as Value;
}
```

{% endcode %}

### Return type

#### [<mark style="color:green;">`Value`</mark>](/draft/number/generic-type-variables#number-less-than-value-greater-than)

### Returns

The **return value** is the [primitive value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/valueOf) of generic type variable [`Value`](/draft/number/generic-type-variables#number-less-than-value-greater-than).

## Example usage

```typescript
// Example usage.
import { Number } from '@angular-package/range';

// Define constant `id`.
const id = 390;

// Returns 390 of type 390.
new Number(id).valueOf();
```


# Overview

The \`Range\` object

## `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="/pages/FLPMf7VWQDn7jUWffUTR"><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="/pages/UGBxh1tB0YNadfDcttUF">minimum</a> to the <a href="/pages/axyOCaYA3ZNCNCFu5va6">maximum</a> with the <a href="/pages/MLb0oEuCazKVOozjKbw0">step</a> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p> |                                                                                                                                                                                                                                                                                                                                   |
| <p><strong>public get</strong> <a href="/pages/MLb0oEuCazKVOozjKbw0"><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="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                                                                                                                                                                                                                                  |                                                                                                                                                                                                                                                                                                                                   |
| <p><strong>public get</strong> <a href="/pages/86ARBn6wu71jfsrnz8XK"><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="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                                                                                                                                                                                                                         |                                                                                                                                                                                                                                                                                                                                   |
| <p><strong>public</strong> <a href="/pages/K3Di7Lb1PzkbEN0Iwo3M"><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="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p> |
| <p><strong>public get</strong> <a href="/pages/Ns1OIzuhULi4YsoITqE0"><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="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a>.</p>                                                                      |                                                                                                                                                                                                                                                                                                                                   |

### Properties

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public readonly</strong> <a href="/pages/axyOCaYA3ZNCNCFu5va6"><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="/pages/txSrhbDBo4Fr6Q8vSQq8#maxextendsnumber"><code>Max</code></a> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                                               |
| <p><strong>public readonly</strong> <a href="/pages/UGBxh1tB0YNadfDcttUF"><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="/pages/txSrhbDBo4Fr6Q8vSQq8#minextendsnumber"><code>Min</code></a> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                                              |
| <p><a href="/pages/qiERKAOFFufvxtIfBsvE"><strong>#maximum</strong></a>: <mark style="color:green;">Maximum</mark><<mark style="color:green;">Max</mark>><br>Private property of the <a href="/pages/FsmzzwAsU4wnhzR6Owkf"><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="/pages/RwXpgUNNhW6AL5svgNSC#max-max"><code>max</code></a> of the <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> constructor indicates the maximum range.</p> |
| <p><a href="/pages/bMuWz38V6I3JbVpV6sUE"><strong>#minimum</strong></a>: <mark style="color:green;">Minimum</mark><<mark style="color:green;">Min</mark>><br>Private property of the <a href="/pages/hVzjtjutjQy5nmHoH46a"><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="/pages/RwXpgUNNhW6AL5svgNSC#min-min"><code>min</code></a> of the <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> constructor indicates the minimum range.</p> |
| <p><a href="/pages/sTRvuDZPmWSQJCZj2IkE"><strong>#step</strong></a>: <mark style="color:green;">Step</mark><br>The private property of the generic type variable <a href="/pages/txSrhbDBo4Fr6Q8vSQq8#range-less-than-min-max-step-greater-than-2"><code>Step</code></a> indicates the range step.</p>                                                                                                                                                                                                                                                                                                                |
| <p><a href="/pages/9mgAFAcwZJAd3Km6iqZw"><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="/pages/QSFXcpwkJ0RxxPVXyWy0"><strong>create()</strong></a>: <mark style="color:green;">Range</mark><<mark style="color:green;">Value</mark>><br>Returns a new instance of <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> with a range of the given required <a href="/pages/QSFXcpwkJ0RxxPVXyWy0#min-min"><code>min</code></a>, <a href="/pages/QSFXcpwkJ0RxxPVXyWy0#max-max"><code>max</code></a> and optional current <a href="/pages/QSFXcpwkJ0RxxPVXyWy0#value-number"><code>value</code></a>, <a href="/pages/QSFXcpwkJ0RxxPVXyWy0#step-step-1-asstep"><code>step</code></a>.</p>                                       |
| <p><strong>public static</strong> <a href="/pages/sIGYHXCAavdVGwnTKkNf"><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="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> instance from the given random <a href="/pages/sIGYHXCAavdVGwnTKkNf#numbers-number"><code>numbers</code></a> and the <a href="/pages/sIGYHXCAavdVGwnTKkNf#step-step"><code>step</code></a>.</p>                                                                                                                            |
| <p><strong>public static</strong> <a href="/pages/DiPxawuJLWgVwTQox5jU"><strong>createMaximum()</strong></a>: <mark style="color:green;">Maximum</mark><<mark style="color:green;">Value</mark>><br>Returns the <a href="/pages/FsmzzwAsU4wnhzR6Owkf"><code>Maximum</code></a> instance of the given <strong>maximum</strong> <a href="/pages/EKYdWnu3CDizYOPf9eTO#value-value"><code>value</code></a>.</p>                                                                                                                                                                                                                                                                           |
| <p><strong>public static</strong> <a href="/pages/DiPxawuJLWgVwTQox5jU"><strong>createMinimum()</strong></a>: <mark style="color:green;">Minimum</mark><<mark style="color:green;">Value</mark>><br>Returns the <a href="/pages/hVzjtjutjQy5nmHoH46a"><code>Minimum</code></a> instance of the given <strong>minimum</strong> <a href="/pages/DiPxawuJLWgVwTQox5jU#value-value"><code>value</code></a>.</p>                                                                                                                                                                                                                                                                           |
| <p><strong>public static</strong> <a href="/pages/5olg23oRfx2qdPmEMcOX"><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="/pages/5olg23oRfx2qdPmEMcOX#value-any"><code>value</code></a> is an instance of <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> of any or the given <a href="/pages/5olg23oRfx2qdPmEMcOX#min-min"><strong>minimum</strong></a> and <a href="/pages/5olg23oRfx2qdPmEMcOX#max-max"><strong>maximum</strong></a> range and <a href="/pages/5olg23oRfx2qdPmEMcOX#step-step"><code>step</code></a>.</p> |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |                                                                                                                                                                                                                                                                                                                                                                                                |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public</strong> <a href="/pages/9IXA1BpZcHLCKRBYTkkD"><strong>forEachStep()</strong></a>: <mark style="color:green;">this</mark><br>Performs the specified action for each step in the <a href="/pages/axyOCaYA3ZNCNCFu5va6">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="/pages/KY2K1sTYmkccTpci8kfM"><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="/pages/UGBxh1tB0YNadfDcttUF">minimum</a> to the current <a href="/pages/K3Di7Lb1PzkbEN0Iwo3M">value</a> by the <a href="/pages/MLb0oEuCazKVOozjKbw0"><code>step</code></a> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                     |
| <p><strong>public</strong> <a href="/pages/X1kL1HvQtpi1Zmy2ybuD"><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="/pages/K3Di7Lb1PzkbEN0Iwo3M">value</a>.</p>                                                                                                                                                                                                                                                              |
| <p><a href="/pages/OtGsebfmmgxwodFETxTk#undefined"><mark style="color:red;">⚠</mark></a> <strong>public</strong> <a href="/pages/LFoaENTZmdqtBTzXQIgt"><strong>getMax()</strong></a>: <mark style="color:green;">Max</mark><br>Gets the <strong>maximum</strong> range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><a href="/pages/OtGsebfmmgxwodFETxTk#undefined"><mark style="color:red;">⚠</mark></a> <strong>public</strong> <a href="/pages/QhlVVRehZHqa5bcbA1rd"><strong>getMin()</strong></a>: <mark style="color:green;">Min</mark><br>Gets the <strong>minimum</strong> range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/dXvAlbtLbzaj3w9i2tZv"><strong>getRange()</strong></a>: <mark style="color:green;">number</mark>\[]<br>Returns range of numbers from <a href="/pages/UGBxh1tB0YNadfDcttUF">minimum</a> to the given <a href="/pages/dXvAlbtLbzaj3w9i2tZv#value-number-this.max"><code>value</code></a> with the <a href="/pages/MLb0oEuCazKVOozjKbw0"><code>step</code></a> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/l2xYQPkijNVkX8miZv7c"><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="/pages/MLb0oEuCazKVOozjKbw0"><code>step</code></a> from the <a href="/pages/UGBxh1tB0YNadfDcttUF">minimum</a> to the given <a href="/pages/l2xYQPkijNVkX8miZv7c#step-number"><code>step</code></a> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p> |
| <p><strong>public</strong> <a href="/pages/FDN16aYE4SyjCiID2CBR"><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="/pages/FDN16aYE4SyjCiID2CBR#step-number"><code>step</code></a>.</p>                                                                                                                                                                                                                               |
| <p><strong>public</strong> <a href="/pages/rB7CXMnw17TwjN6uKBAO"><strong>has()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/rB7CXMnw17TwjN6uKBAO#value-number"><code>value</code></a> is in the range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/RBfEX2Ue9lGCEUX8HgIp"><strong>hasEvery()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether every value of the given <a href="/pages/RBfEX2Ue9lGCEUX8HgIp#...values-number"><code>values</code></a> is in the range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/btdZ4Qh7QdlmIZWnmXrN"><strong>hasSome()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether some <a href="/pages/btdZ4Qh7QdlmIZWnmXrN#...values-number"><code>values</code></a> are in the range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                                                  |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/cOZk3IZ47dgLWxri6X3t"><strong>isBetween()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether range of the given <a href="/pages/cOZk3IZ47dgLWxri6X3t#min-number"><code>min</code></a> and <a href="/pages/cOZk3IZ47dgLWxri6X3t#max-number"><code>max</code></a> is between the range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/xUAw8v9sZBu77tIqcfOA"><strong>isBetweenEvery()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object is between every range of the given <a href="/pages/xUAw8v9sZBu77tIqcfOA#...ranges-number-number"><code>ranges</code></a>.</p>                                                                                                                                                                            |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/MoZjsKLwzky7aZw9h2qv"><strong>isBetweenSome()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object is between <strong>some</strong> given <a href="/pages/MoZjsKLwzky7aZw9h2qv#...ranges-number-number"><code>ranges</code></a>.</p>                                                                                                                                                                          |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/hi6jxvIdrkSjpisiGc03"><strong>maxGreaterThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/hi6jxvIdrkSjpisiGc03#value-number"><code>value</code></a> is <strong>less</strong> than the <a href="/pages/axyOCaYA3ZNCNCFu5va6"><strong>maximum</strong></a> <strong>range</strong> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                      |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/KIMEBubWprHAFOUMAhyG"><strong>maxLessThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/KIMEBubWprHAFOUMAhyG#value-number"><code>value</code></a> is greater than the <a href="/pages/axyOCaYA3ZNCNCFu5va6"><strong>maximum</strong></a> <strong>range</strong> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/8c0RUMIfKHusI44Mqj0h"><strong>minGreaterThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/8c0RUMIfKHusI44Mqj0h#value-number"><code>value</code></a> is <strong>less</strong> than a <a href="/pages/UGBxh1tB0YNadfDcttUF"><strong>minimum</strong></a> <strong>range</strong> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                        |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/LNl7lsrUbsA0yBXoSwh9"><strong>minLessThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/LNl7lsrUbsA0yBXoSwh9#value-number"><code>value</code></a> is greater than the <a href="/pages/UGBxh1tB0YNadfDcttUF"><strong>minimum</strong></a> <strong>range</strong> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/s8Imcz2PSbof3rBZDFGi"><strong>setValue()</strong></a>: <mark style="color:green;">this</mark><br>Sets the range <a href="/pages/K3Di7Lb1PzkbEN0Iwo3M"><code>value</code></a> between the <a href="/pages/UGBxh1tB0YNadfDcttUF">minimum</a> and <a href="/pages/axyOCaYA3ZNCNCFu5va6#range.prototype.max">maximum</a> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                    |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/gBq19svkE9PP7Ocpylxd"><strong>setValueToStep()</strong></a>: <mark style="color:green;">this</mark><br>Sets the <a href="/pages/K3Di7Lb1PzkbEN0Iwo3M"><code>value</code></a> of the specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object to the value of the given <a href="/pages/gBq19svkE9PP7Ocpylxd#step-number"><code>step</code></a>.</p>                                                                                                                                                        |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/Fcuv6FIbkJXNWgz4Wxw8"><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="/pages/OtGsebfmmgxwodFETxTk#undefined"><mark style="color:red;">⚠</mark></a> <strong>public</strong> <a href="/pages/GJqGdZJ82JGz4XJZvwRB"><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="/pages/OtGsebfmmgxwodFETxTk#undefined"><mark style="color:red;">⚠</mark></a> <strong>public</strong> <a href="/pages/pAvLgk7tvMGKtjf2J13G#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="/pages/hVzjtjutjQy5nmHoH46a"><code>Minimum</code></a> and <a href="/pages/FsmzzwAsU4wnhzR6Owkf"><code>Maximum</code></a> instances.</p> |                                                                                                                                                                                                                                                                                                                                                                                                |


# Generic type variables

The \`Range\` object generic type variables

### `Range<`<mark style="color:green;background-color:green;">`Min`</mark>`,`<mark style="color:green;">`Max`</mark>`,`<mark style="color:green;">`Step`</mark>`>`

#### <mark style="color:green;">`Min`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

​A generic type variable constrained by the [`number`](https://www.typescriptlang.org/docs/handbook/basic-types.html#number), by default of the value **captured** from the supplied [`min`](/draft/range/constructor#min-min) indicates the minimum range type of a new [`Range`](/draft/range/overview) instance.

{% code title="range.class.ts" %}

```typescript
class Range<
  Min extends number, // <--- Declare generic type variable Min.
  Max extends number,
  Step extends number = 1
> {
  constructor(
    min: Min, // <--- Capture generic type variable Min.
    max: Max,
    value?: number,
    step: Step = 1 as Step
  ) { }
}
```

{% endcode %}

### `Range<`<mark style="color:green;">`Min`</mark>`,`<mark style="color:green;background-color:green;">`Max`</mark>`,`<mark style="color:green;">`Step`</mark>`>`

#### <mark style="color:green;">`Max`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

A generic type variable constrained by the [`number`](https://www.typescriptlang.org/docs/handbook/basic-types.html#number), by default of the value **captured** from the supplied [`max`](/draft/range/constructor#max-max) indicates the maximum range type of a new [`Range`](/draft/range/overview) instance.

```typescript
class Range<
  Min extends number,
  Max extends number, // <--- Declare generic type variable Max.
  Step extends number = 1
> {
  constructor(
    min: Min,
    max: Max, // <--- Capture generic type variable Max.
    value?: number,
    step: Step = 1 as Step
  ) {}
}
```

### `Range<`<mark style="color:green;">`Min`</mark>`,`<mark style="color:green;">`Max`</mark>`,`<mark style="color:green;background-color:green;">`Step`</mark>`>`

#### <mark style="color:green;">`Step`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)`= 1`

A generic type variable constrained by the [`number`](https://www.typescriptlang.org/docs/handbook/basic-types.html#number), by default of the value equal to `1`, optionally **captured** from the supplied [`step`](/draft/range/constructor#step-step) indicates the range step type of a new [`Range`](/draft/range/overview) instance.

```typescript
class Range<
  Min extends number,
  Max extends number,
  Step extends number = 1 // <--- Declare generic type variable Step.
> {
  constructor(
    min: Min,
    max: Max,
    value?: number,
    step: Step = 1 as Step // <--- Capture generic type variable Step.
  ) { }
}
```


# ★ Constructor

Creates the \`Range\` instance with a range of the given required \`min\`, \`max\` and optional current \`value\`, \`step\`

## `Range()`

Creates the [`Range`](/draft/range/overview) instance with a range of the given required [`min`](#min-min), [`max`](#max-max) and optional current [`value`](#value-number), [`step`](#step-step-1-asstep).

{% code title="range.class.ts" %}

```typescript
constructor(min: Min, max: Max, value?: number, step: Step = 1 as Step) {
  this.#maximum = new Maximum(max);
  this.#minimum = new Minimum(min);
  this.#step = step;
  // Sets the range value between the given `min` and `max`.
  this.value = value;
  // Define the `min` and `max` property.
  Object.defineProperties(this, {
    min: {
      value: min,
      enumerable: true,
      writable: false,
    },
    max: {
      value: max,
      enumerable: true,
      writable: false,
    },
  });
}
```

{% endcode %}

### Parameters

#### `min:`[<mark style="color:green;">`Min`</mark>](/draft/range/generic-type-variables#range-less-than-min-max-step-greater-than)

The **minimum** range of generic type variable [`Min`](/draft/range/generic-type-variables#range-less-than-min-max-step-greater-than) to set with a new [`Range`](/draft/range/overview) instance.

#### `max:`[<mark style="color:green;">`Max`</mark>](/draft/range/generic-type-variables#range-less-than-min-max-step-greater-than-1)

The **maximum** range of generic type variable [`Max`](/draft/range/generic-type-variables#range-less-than-min-max-step-greater-than-1) to set with a new [`Range`](/draft/range/overview) instance.

#### `value?:`[<mark style="color:green;">`number`</mark>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)

The optional value of the [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) type between the given [`min`](#min-min) and [`max`](#max-max) specifies the default value of a new [`Range`](/draft/range/overview) instance.

#### `step:`[<mark style="color:green;">`Step`</mark>](/draft/range/generic-type-variables#range-less-than-min-max-step-greater-than-2)=`1 as`[<mark style="color:green;">`Step`</mark>](/draft/range/generic-type-variables#range-less-than-min-max-step-greater-than-2)

Optional step of generic type variable [`Step`](/draft/range/generic-type-variables#stepextendsnumber-1) to set with a new [`Range`](/draft/range/overview) instance, by default **`1`**.

{% hint style="info" %}
The step is used by the [`range`](/draft/range/accessors/get-range) accessor, [`getRange()`](/draft/range/methods/getrange) , [`getRangeOfStep()`](/draft/range/methods/getrangeofstep) and [`stepByStep()`](/draft/range/methods/stepbystep) methods to return the entire range and also by the [`valueDown()`](/draft/range/methods/valuedown), [`valueUp()`](/draft/range/methods/valueup) methods to respectively decrement, increment range value.
{% endhint %}

## Example usage

```typescript
// Example usage.
import { Range } from '@angular-package/range';

// Returns Range {min: 4, max: 27} of Range<4, 27, 1>
new Range(4, 27);

// Returns Range {min: 4, max: 27, value: 27} of Range<4, 27, 1>
new Range(4, 27, 27);

// Returns Range {min: 4, max: 27, value: 5} of Range<4, 27, 1.5>
new Range(4, 27, 5, 1.5);
```


# Accessors

The \`Range\` object accessors

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |                                                                                                                                                                                                                                                                                                                                   |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public get</strong> <a href="/pages/FLPMf7VWQDn7jUWffUTR"><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="/pages/UGBxh1tB0YNadfDcttUF">minimum</a> to the <a href="/pages/axyOCaYA3ZNCNCFu5va6">maximum</a> with the <a href="/pages/MLb0oEuCazKVOozjKbw0">step</a> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p> |                                                                                                                                                                                                                                                                                                                                   |
| <p><strong>public get</strong> <a href="/pages/MLb0oEuCazKVOozjKbw0"><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="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                                                                                                                                                                                                                                  |                                                                                                                                                                                                                                                                                                                                   |
| <p><strong>public get</strong> <a href="/pages/86ARBn6wu71jfsrnz8XK"><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="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                                                                                                                                                                                                                         |                                                                                                                                                                                                                                                                                                                                   |
| <p><strong>public</strong> <a href="/pages/K3Di7Lb1PzkbEN0Iwo3M"><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="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p> |
| <p><strong>public get</strong> <a href="/pages/Ns1OIzuhULi4YsoITqE0"><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="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a>.</p>                                                                      |                                                                                                                                                                                                                                                                                                                                   |


# get range()

The \`get\` accessor obtains the range of an \`Array\` of the minimum to the maximum with the step of a specified \`Range\` object

## `Range.prototype.range`

The [`get`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) accessor obtains the range of an [`Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) of the [minimum](/draft/range/properties/min) to the [maximum](/draft/range/properties/max) with the [step](/draft/range/accessors/get-step) of a specified [`Range`](/draft/range/overview) object.

{% code title="range.class.ts" %}

```typescript
public get range(): Readonly<Array<number>> {
  return this.getRange();
}
```

{% endcode %}

### Type

#### [<mark style="color:green;">`Readonly`</mark>](https://www.typescriptlang.org/docs/handbook/utility-types.html#readonlytype)`<`[<mark style="color:green;">`Array`</mark>](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#arrays)`<`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)`>>`

### Returns

The **return value** is the range from [minimum](/draft/range/properties/min) to the [maximum](/draft/range/properties/max) of a read-only [`Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) of [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number).

## Example usage

```typescript
// Example usage.
import { Range } from '@angular-package/range';

// Create new instance.
// Returns Range {min: 3, max: 27, value: 10} of Range<3, 27, 3>.
const range = new Range(3, 27, 10, 3);

// Returns
// (9) [3, 6, 9, 12, 15, 18, 21, 24, 27] of type readonly number[]
range.range;
```


# get step()

The \`get\` accessor obtains the step of a specified \`Range\` object

## `Range.prototype.step`

The [`get`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) accessor obtains the step of a specified [`Range`](/draft/range/overview) object. It's used to return the entire range, get the step of the range value, and change the range value.

{% code title="range.class.ts" %}

```typescript
public get step(): Step {
  return this.#step;
}
```

{% endcode %}

### Type

#### [<mark style="color:green;">`Step`</mark>](/draft/range/generic-type-variables#range-less-than-min-max-step-greater-than-2)

## Example usage

```typescript
// Example usage.
import { Range } from '@angular-package/range';

// Create new instance.
// Returns Range {min: 4, max: 27, value: 4} of Range<4, 27, 1.5>.
const range = new Range(4, 27, 4, 1.5);

// Returns 1.5 of type 1.5
range.step;
```


# get steps()

Retrieves the number of steps of the specified \`Range\` object

## `Range.prototype.steps`

The [`get`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) accessor retrieves the [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) of steps of the specified [`Range`](/draft/range/overview) object.

{% code title="range.class.ts" %}

```typescript
public get steps(): number {
  return this.getRange().length;
}
```

{% endcode %}

### Type

#### [<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

## Example usage

```typescript
// Example usage.
import { Range } from '@angular-package/range';

// Create new instance.
// Returns Range {min: 3, max: 27, value: 10} of Range<3, 27, 3>.
const range = new Range(3, 27, 10, 3);

// Returns 9 of number type.
range.steps;
```


# value()?

The \`value\` accessor indicates the range current value of the number type of a specified \`Range\` object

## `Range.prototype.value`

The `value` accessor indicates the range current value of the [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) type of a specified [`Range`](/draft/range/overview) object.

### `get`

The [`get`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) accessor retrieves the [`#value`](/draft/range/properties/value#value) property that indicates the range current value of the [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) type of a specified [`Range`](/draft/range/overview) object. It can be set by the [`setValue()`](/draft/range/methods/setvalue) method.

{% code title="range.class.ts" %}

```typescript
public get value(): number | undefined {
  return this.#value;
}
```

{% endcode %}

### `set`

The [`set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set) accessor sets the range current value of the [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) type between the [minimum](/draft/range/properties/min) and [maximum](/draft/range/properties/max) of a specified [`Range`](/draft/range/overview) object.

{% code title="range.class.ts" %}

```typescript
public set value(value: number | undefined) {
  typeof value === 'number'
    ? this.has(value) && (this.#value = value)
    : undefined;
}
```

{% endcode %}

### Type

#### [<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)`|`[<mark style="color:green;">`undefined`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#null-and-undefined)

## Example usage

```typescript
// Example usage.
import { Range } from '@angular-package/range';

// Create new instance.
// Returns Range {min: -27, max: 27, value: 11} of Range<4, 27, 1>.
const range = new Range(-27, 27, 11);

// Returns 11 of type number | undefined.
range.value;

// Sets below minimum.
range.value = -28;

// Returns 11. Nothing was changed.
range.value;

// Sets above maximum.
range.value = 28;

// Returns 11. Nothing was changed.
range.value;
```


# get \[Symbol.toStringTag]\()

The \`get\` accessor, with the help of \`toStringTag\`, changes the default tag to 'Range' for an instance of \`Range\`

## `[Symbol.toStringTag]`

The [`get`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) accessor, with the help of [`toStringTag`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag), changes the default tag to `'Range'` for an instance of [`Range`](/draft/range/overview).

{% code title="range.class.ts" %}

```typescript
public get [Symbol.toStringTag](): string {
  return 'Range';
}
```

{% endcode %}

### Return type

#### [<mark style="color:green;">`string`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#string)

## Example usage

```typescript
// Example usage.
import { Range } from '@angular-package/range';
import { typeOf } from '@angular-package/type';

// Returns "range".
typeOf(new Range(4, 27));
```


# Properties

The \`Range\` object properties

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public readonly</strong> <a href="/pages/axyOCaYA3ZNCNCFu5va6"><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="/pages/txSrhbDBo4Fr6Q8vSQq8#maxextendsnumber"><code>Max</code></a> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                                               |
| <p><strong>public readonly</strong> <a href="/pages/UGBxh1tB0YNadfDcttUF"><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="/pages/txSrhbDBo4Fr6Q8vSQq8#minextendsnumber"><code>Min</code></a> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                                              |
| <p><a href="/pages/qiERKAOFFufvxtIfBsvE"><strong>#maximum</strong></a>: <mark style="color:green;">Maximum</mark><<mark style="color:green;">Max</mark>><br>Private property of the <a href="/pages/FsmzzwAsU4wnhzR6Owkf"><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="/pages/RwXpgUNNhW6AL5svgNSC#max-max"><code>max</code></a> of the <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> constructor indicates the maximum range.</p> |
| <p><a href="/pages/bMuWz38V6I3JbVpV6sUE"><strong>#minimum</strong></a>: <mark style="color:green;">Minimum</mark><<mark style="color:green;">Min</mark>><br>Private property of the <a href="/pages/hVzjtjutjQy5nmHoH46a"><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="/pages/RwXpgUNNhW6AL5svgNSC#min-min"><code>min</code></a> of the <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> constructor indicates the minimum range.</p> |
| <p><a href="/pages/sTRvuDZPmWSQJCZj2IkE"><strong>#step</strong></a>: <mark style="color:green;">Step</mark><br>The private property of the generic type variable <a href="/pages/txSrhbDBo4Fr6Q8vSQq8#range-less-than-min-max-step-greater-than-2"><code>Step</code></a> indicates the range step.</p>                                                                                                                                                                                                                                                                                                                |
| <p><a href="/pages/9mgAFAcwZJAd3Km6iqZw"><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>                                                                                                                                                                                                                                                                                                          |


# max!

The maximum range of a specified \`Range\` object

## `Range.prototype.max`

The `max` read-only property is the maximum range of generic type variable [`Max`](/draft/range/generic-type-variables#range-less-than-min-max-step-greater-than-1) of a specified [`Range`](/draft/range/overview) object.

{% code title="range.class.ts" %}

```typescript
public readonly max!: Max;
```

{% endcode %}

### Type

#### [<mark style="color:green;">`Max`</mark>](/draft/range/generic-type-variables#range-less-than-min-max-step-greater-than-1)

## Example usage

```typescript
// Example usage.
import { Range } from '@angular-package/range';

// Create new instance.
// Returns Range {min: 4, max: 27, value: 5} of Range<4, 27, 1>.
const range = new Range(4, 27, 5);

// Returns 27 of type 27.
range.max;
```


# min!

The minimum range of a specified \`Range\` object

## `Range.prototype.min`

The `min` read-only property is the minimum range of generic type variable [`Min`](/draft/range/generic-type-variables#range-less-than-min-max-step-greater-than) of a specified [`Range`](/draft/range/overview) object.

{% code title="range.class.ts" %}

```typescript
public readonly min!: Min;
```

{% endcode %}

### Type

#### [<mark style="color:green;">`Min`</mark>](/draft/range/generic-type-variables#range-less-than-min-max-step-greater-than)

## Example usage

```typescript
// Example usage.
import { Range } from '@angular-package/range';

// Create new instance.
// Returns Range {min: 4, max: 27} of Range<4, 27, 1>.
const range = new Range(4, 27);

// Returns 4 of type 4.
range.min;
```


# #maximum

Private property of the \`Maximum\` primitive wrapper object with a primitive value from a given \`max\` of the \`Range\` constructor indicates the maximum range

## `#maximum`

Private property of the [`Maximum`](/draft/maximum/overview) [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) with a primitive value from a given [`max`](/draft/range/constructor#max-max) of the [`Range`](/draft/range/overview) constructor indicates the maximum range.

{% code title="range.class.ts" %}

```typescript
#maximum: Maximum<Max>;
```

{% endcode %}

### Type

#### [<mark style="color:green;">`Maximum`</mark>](/draft/maximum/overview)`<`[<mark style="color:green;">`Max`</mark>](/draft/range/generic-type-variables#range-less-than-min-max-step-greater-than-1)`>`


# #minimum

Private property of the \`Minimum\` primitive wrapper object with a primitive value from a given \`min\` of the \`Range\` constructor indicates the minimum range

## `#minimum`

Private property of the [`Minimum`](/draft/minimum/overview) [primitive wrapper object](https://developer.mozilla.org/en-US/docs/Glossary/Primitive#primitive_wrapper_objects_in_javascript) with a primitive value from a given [`min`](/draft/range/constructor#min-min) of the [`Range`](/draft/range/overview) constructor indicates the minimum range.

{% code title="range.class.ts" %}

```typescript
#minimum: Minimum<Min>;
```

{% endcode %}

### Type

#### [<mark style="color:green;">`Minimum`</mark>](/draft/minimum/overview)`<`[<mark style="color:green;">`Min`</mark>](/draft/range/generic-type-variables#range-less-than-min-max-step-greater-than)`>`


# #step

The private property of the generic type variable \`Step\` indicates the range step

## `#step`

The private property of the generic type variable [`Step`](/draft/range/generic-type-variables#range-less-than-min-max-step-greater-than-2) indicates the range step. It's used to return the entire range, get the step of the range value, and change the range value.

{% code title="range.class.ts" %}

```typescript
#step: Step;
```

{% endcode %}

### Type

#### [<mark style="color:green;">`Step`</mark>](/draft/range/generic-type-variables#range-less-than-min-max-step-greater-than-2)


# #value?

The private property of the number type indicates the range value

## `#value?`

The private property of the [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) type indicates the range value.  It can be set by the [`setValue()`](/draft/range/methods/setvalue) method and [`setter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set) [`value`](/draft/range/accessors/value).

{% code title="range.class.ts" %}

```typescript
#value?: number;
```

{% endcode %}

### Type

#### [<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)`|`[<mark style="color:green;">`undefined`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#null-and-undefined)


# Methods

The \`Range\` object methods

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public static</strong> <a href="/pages/QSFXcpwkJ0RxxPVXyWy0"><strong>create()</strong></a>: <mark style="color:green;">Range</mark><<mark style="color:green;">Value</mark>><br>Returns a new instance of <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> with a range of the given required <a href="/pages/QSFXcpwkJ0RxxPVXyWy0#min-min"><code>min</code></a>, <a href="/pages/QSFXcpwkJ0RxxPVXyWy0#max-max"><code>max</code></a> and optional current <a href="/pages/QSFXcpwkJ0RxxPVXyWy0#value-number"><code>value</code></a>, <a href="/pages/QSFXcpwkJ0RxxPVXyWy0#step-step-1-asstep"><code>step</code></a>.</p>                                       |
| <p><strong>public static</strong> <a href="/pages/sIGYHXCAavdVGwnTKkNf"><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="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> instance from the given random <a href="/pages/sIGYHXCAavdVGwnTKkNf#numbers-number"><code>numbers</code></a> and the <a href="/pages/sIGYHXCAavdVGwnTKkNf#step-step"><code>step</code></a>.</p>                                                                                                                            |
| <p><strong>public static</strong> <a href="/pages/DiPxawuJLWgVwTQox5jU"><strong>createMaximum()</strong></a>: <mark style="color:green;">Maximum</mark><<mark style="color:green;">Value</mark>><br>Returns the <a href="/pages/FsmzzwAsU4wnhzR6Owkf"><code>Maximum</code></a> instance of the given <strong>maximum</strong> <a href="/pages/EKYdWnu3CDizYOPf9eTO#value-value"><code>value</code></a>.</p>                                                                                                                                                                                                                                                                           |
| <p><strong>public static</strong> <a href="/pages/DiPxawuJLWgVwTQox5jU"><strong>createMinimum()</strong></a>: <mark style="color:green;">Minimum</mark><<mark style="color:green;">Value</mark>><br>Returns the <a href="/pages/hVzjtjutjQy5nmHoH46a"><code>Minimum</code></a> instance of the given <strong>minimum</strong> <a href="/pages/DiPxawuJLWgVwTQox5jU#value-value"><code>value</code></a>.</p>                                                                                                                                                                                                                                                                           |
| <p><strong>public static</strong> <a href="/pages/5olg23oRfx2qdPmEMcOX"><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="/pages/5olg23oRfx2qdPmEMcOX#value-any"><code>value</code></a> is an instance of <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> of any or the given <a href="/pages/5olg23oRfx2qdPmEMcOX#min-min"><strong>minimum</strong></a> and <a href="/pages/5olg23oRfx2qdPmEMcOX#max-max"><strong>maximum</strong></a> range and <a href="/pages/5olg23oRfx2qdPmEMcOX#step-step"><code>step</code></a>.</p> |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |                                                                                                                                                                                                                                                                                                                                                                                                |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public</strong> <a href="/pages/9IXA1BpZcHLCKRBYTkkD"><strong>forEachStep()</strong></a>: <mark style="color:green;">this</mark><br>Performs the specified action for each step in the <a href="/pages/axyOCaYA3ZNCNCFu5va6">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="/pages/KY2K1sTYmkccTpci8kfM"><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="/pages/UGBxh1tB0YNadfDcttUF">minimum</a> to the current <a href="/pages/K3Di7Lb1PzkbEN0Iwo3M">value</a> by the <a href="/pages/MLb0oEuCazKVOozjKbw0"><code>step</code></a> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                     |
| <p><strong>public</strong> <a href="/pages/X1kL1HvQtpi1Zmy2ybuD"><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="/pages/K3Di7Lb1PzkbEN0Iwo3M">value</a>.</p>                                                                                                                                                                                                                                                              |
| <p><a href="/pages/OtGsebfmmgxwodFETxTk#undefined"><mark style="color:red;">⚠</mark></a> <strong>public</strong> <a href="/pages/LFoaENTZmdqtBTzXQIgt"><strong>getMax()</strong></a>: <mark style="color:green;">Max</mark><br>Gets the <strong>maximum</strong> range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><a href="/pages/OtGsebfmmgxwodFETxTk#undefined"><mark style="color:red;">⚠</mark></a> <strong>public</strong> <a href="/pages/QhlVVRehZHqa5bcbA1rd"><strong>getMin()</strong></a>: <mark style="color:green;">Min</mark><br>Gets the <strong>minimum</strong> range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/dXvAlbtLbzaj3w9i2tZv"><strong>getRange()</strong></a>: <mark style="color:green;">number</mark>\[]<br>Returns range of numbers from <a href="/pages/UGBxh1tB0YNadfDcttUF">minimum</a> to the given <a href="/pages/dXvAlbtLbzaj3w9i2tZv#value-number-this.max"><code>value</code></a> with the <a href="/pages/MLb0oEuCazKVOozjKbw0"><code>step</code></a> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/l2xYQPkijNVkX8miZv7c"><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="/pages/MLb0oEuCazKVOozjKbw0"><code>step</code></a> from the <a href="/pages/UGBxh1tB0YNadfDcttUF">minimum</a> to the given <a href="/pages/l2xYQPkijNVkX8miZv7c#step-number"><code>step</code></a> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p> |
| <p><strong>public</strong> <a href="/pages/FDN16aYE4SyjCiID2CBR"><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="/pages/FDN16aYE4SyjCiID2CBR#step-number"><code>step</code></a>.</p>                                                                                                                                                                                                                               |
| <p><strong>public</strong> <a href="/pages/rB7CXMnw17TwjN6uKBAO"><strong>has()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/rB7CXMnw17TwjN6uKBAO#value-number"><code>value</code></a> is in the range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/RBfEX2Ue9lGCEUX8HgIp"><strong>hasEvery()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether every value of the given <a href="/pages/RBfEX2Ue9lGCEUX8HgIp#...values-number"><code>values</code></a> is in the range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/btdZ4Qh7QdlmIZWnmXrN"><strong>hasSome()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether some <a href="/pages/btdZ4Qh7QdlmIZWnmXrN#...values-number"><code>values</code></a> are in the range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                                                  |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/cOZk3IZ47dgLWxri6X3t"><strong>isBetween()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether range of the given <a href="/pages/cOZk3IZ47dgLWxri6X3t#min-number"><code>min</code></a> and <a href="/pages/cOZk3IZ47dgLWxri6X3t#max-number"><code>max</code></a> is between the range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/xUAw8v9sZBu77tIqcfOA"><strong>isBetweenEvery()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object is between every range of the given <a href="/pages/xUAw8v9sZBu77tIqcfOA#...ranges-number-number"><code>ranges</code></a>.</p>                                                                                                                                                                            |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/MoZjsKLwzky7aZw9h2qv"><strong>isBetweenSome()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object is between <strong>some</strong> given <a href="/pages/MoZjsKLwzky7aZw9h2qv#...ranges-number-number"><code>ranges</code></a>.</p>                                                                                                                                                                          |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/hi6jxvIdrkSjpisiGc03"><strong>maxGreaterThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/hi6jxvIdrkSjpisiGc03#value-number"><code>value</code></a> is <strong>less</strong> than the <a href="/pages/axyOCaYA3ZNCNCFu5va6"><strong>maximum</strong></a> <strong>range</strong> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                      |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/KIMEBubWprHAFOUMAhyG"><strong>maxLessThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/KIMEBubWprHAFOUMAhyG#value-number"><code>value</code></a> is greater than the <a href="/pages/axyOCaYA3ZNCNCFu5va6"><strong>maximum</strong></a> <strong>range</strong> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/8c0RUMIfKHusI44Mqj0h"><strong>minGreaterThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/8c0RUMIfKHusI44Mqj0h#value-number"><code>value</code></a> is <strong>less</strong> than a <a href="/pages/UGBxh1tB0YNadfDcttUF"><strong>minimum</strong></a> <strong>range</strong> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                        |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/LNl7lsrUbsA0yBXoSwh9"><strong>minLessThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/LNl7lsrUbsA0yBXoSwh9#value-number"><code>value</code></a> is greater than the <a href="/pages/UGBxh1tB0YNadfDcttUF"><strong>minimum</strong></a> <strong>range</strong> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/s8Imcz2PSbof3rBZDFGi"><strong>setValue()</strong></a>: <mark style="color:green;">this</mark><br>Sets the range <a href="/pages/K3Di7Lb1PzkbEN0Iwo3M"><code>value</code></a> between the <a href="/pages/UGBxh1tB0YNadfDcttUF">minimum</a> and <a href="/pages/axyOCaYA3ZNCNCFu5va6#range.prototype.max">maximum</a> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                    |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/gBq19svkE9PP7Ocpylxd"><strong>setValueToStep()</strong></a>: <mark style="color:green;">this</mark><br>Sets the <a href="/pages/K3Di7Lb1PzkbEN0Iwo3M"><code>value</code></a> of the specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object to the value of the given <a href="/pages/gBq19svkE9PP7Ocpylxd#step-number"><code>step</code></a>.</p>                                                                                                                                                        |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/Fcuv6FIbkJXNWgz4Wxw8"><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="/pages/OtGsebfmmgxwodFETxTk#undefined"><mark style="color:red;">⚠</mark></a> <strong>public</strong> <a href="/pages/GJqGdZJ82JGz4XJZvwRB"><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="/pages/OtGsebfmmgxwodFETxTk#undefined"><mark style="color:red;">⚠</mark></a> <strong>public</strong> <a href="/pages/pAvLgk7tvMGKtjf2J13G#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="/pages/hVzjtjutjQy5nmHoH46a"><code>Minimum</code></a> and <a href="/pages/FsmzzwAsU4wnhzR6Owkf"><code>Maximum</code></a> instances.</p> |                                                                                                                                                                                                                                                                                                                                                                                                |


# ↓ Static

The \`Range\` object static methods

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public static</strong> <a href="/pages/QSFXcpwkJ0RxxPVXyWy0"><strong>create()</strong></a>: <mark style="color:green;">Range</mark><<mark style="color:green;">Value</mark>><br>Returns a new instance of <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> with a range of the given required <a href="/pages/QSFXcpwkJ0RxxPVXyWy0#min-min"><code>min</code></a>, <a href="/pages/QSFXcpwkJ0RxxPVXyWy0#max-max"><code>max</code></a> and optional current <a href="/pages/QSFXcpwkJ0RxxPVXyWy0#value-number"><code>value</code></a>, <a href="/pages/QSFXcpwkJ0RxxPVXyWy0#step-step-1-asstep"><code>step</code></a>.</p>                                       |
| <p><strong>public static</strong> <a href="/pages/sIGYHXCAavdVGwnTKkNf"><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="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> instance from the given random <a href="/pages/sIGYHXCAavdVGwnTKkNf#numbers-number"><code>numbers</code></a> and the <a href="/pages/sIGYHXCAavdVGwnTKkNf#step-step"><code>step</code></a>.</p>                                                                                                                            |
| <p><strong>public static</strong> <a href="/pages/DiPxawuJLWgVwTQox5jU"><strong>createMaximum()</strong></a>: <mark style="color:green;">Maximum</mark><<mark style="color:green;">Value</mark>><br>Returns the <a href="/pages/FsmzzwAsU4wnhzR6Owkf"><code>Maximum</code></a> instance of the given <strong>maximum</strong> <a href="/pages/EKYdWnu3CDizYOPf9eTO#value-value"><code>value</code></a>.</p>                                                                                                                                                                                                                                                                           |
| <p><strong>public static</strong> <a href="/pages/DiPxawuJLWgVwTQox5jU"><strong>createMinimum()</strong></a>: <mark style="color:green;">Minimum</mark><<mark style="color:green;">Value</mark>><br>Returns the <a href="/pages/hVzjtjutjQy5nmHoH46a"><code>Minimum</code></a> instance of the given <strong>minimum</strong> <a href="/pages/DiPxawuJLWgVwTQox5jU#value-value"><code>value</code></a>.</p>                                                                                                                                                                                                                                                                           |
| <p><strong>public static</strong> <a href="/pages/5olg23oRfx2qdPmEMcOX"><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="/pages/5olg23oRfx2qdPmEMcOX#value-any"><code>value</code></a> is an instance of <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> of any or the given <a href="/pages/5olg23oRfx2qdPmEMcOX#min-min"><strong>minimum</strong></a> and <a href="/pages/5olg23oRfx2qdPmEMcOX#max-max"><strong>maximum</strong></a> range and <a href="/pages/5olg23oRfx2qdPmEMcOX#step-step"><code>step</code></a>.</p> |


# static create()

Returns a new instance of \`Range\` with a range of the given required \`min\`, \`max\` and optional current \`value\`,  \`step\`

## `Range.create()`

The static `create()` method returns a new instance of [`Range`](/draft/range/overview) with a range of the given required [`min`](#min-min), [`max`](#max-max) and optional current [`value`](#value-number), [`step`](#step-step-1-asstep).

{% code title="range.class.ts" %}

```typescript
public static create<
  Min extends number,
  Max extends number,
  Step extends number = 1
>(min: Min, max: Max, value?: number, step?: Step): Range<Min, Max, Step> {
  return new this(min, max, value, step);
}
```

{% endcode %}

### Generic type variables

#### <mark style="color:green;">`Min`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

A generic type variable constrained by the [`number`](https://www.typescriptlang.org/docs/handbook/basic-types.html#number), by default of the value **captured** from the supplied [`min`](#min-min) indicates the **minimum** range type of a new [`Range`](/draft/range/overview) instance.

#### <mark style="color:green;">`Max`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

A generic type variable constrained by the [`number`](https://www.typescriptlang.org/docs/handbook/basic-types.html#number), by default of the value **captured** from the supplied [`max`](#max-max) indicates the **maximum** range type of a new [`Range`](/draft/range/overview) instance.

#### <mark style="color:green;">`Step`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)`= 1`

A generic type variable constrained by the [`number`](https://www.typescriptlang.org/docs/handbook/basic-types.html#number), by default of the value equal to **`1`**, optionally **captured** from the supplied [`step`](#step-step-1-asstep) indicates the range step type of a new [`Range`](/draft/range/overview) instance.

### Parameters

#### `min:`[<mark style="color:green;">`Min`</mark>](#minextendsnumber)

The **minimum** range of generic type variable [`Min`](#minextendsnumber) to set with a new [`Range`](/draft/range/overview) instance.

#### `max:`[<mark style="color:green;">`Max`</mark>](#maxextendsnumber)

The **maximum** range of generic type variable [`Max`](#maxextendsnumber) to set with a new [`Range`](/draft/range/overview) instance.

#### `value?:`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

The optional value of the [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) type between the given [`min`](#min-min) and [`max`](#max-max) specifies the default value of a new [`Range`](/draft/range/overview) instance.

#### `step:`<mark style="color:green;">`Step`</mark>=`1 as`[<mark style="color:green;">`Step`</mark>](/draft/range/generic-type-variables#range-less-than-min-max-step-greater-than-2)

Optional step of generic type variable [`Step`](#stepextendsnumber-1) to set with a new [`Range`](/draft/range/overview) instance, by default **`1`**.

### Return type

#### `Range<`[<mark style="color:green;">`Min`</mark>](#minextendsnumber)`,`[<mark style="color:green;">`Max`</mark>](#maxextendsnumber)`,`[<mark style="color:green;">`Step`</mark>](#stepextendsnumber-1)`>`

The **return type** is the [`Range`](/draft/range/overview) object that takes generic type variable [`Min`](#minextendsnumber), [`Max`](#maxextendsnumber) and [`Step`](#stepextendsnumber-1).

### Returns

The **return value** is the [`Range`](/draft/range/overview) instance with a range of the given required [`min`](#min-min), [`max`](#max-max) and optional current [`value`](#value-number), [`step`](#step-step-1-asstep).

## Example usage

```typescript
// Example usage.
import { Range } from '@angular-package/range';

// Returns Range {min: 4, max: 27} of Range<4, 27, 1>
Range.create(4, 27);

// Returns Range {min: 4, max: 27} of Range<4, 27, 1.5>
Range.create(4, 27, undefined, 1.5);

// Returns Range {min: 4, max: 27, value: 4} of Range<4, 27, 1.5>
Range.create(4, 27, 4, 1.5);
```


# static createFrom()

Creates the \`Range\` instance from the given random numbers and the step

## `Range.createFrom()`

Creates the [`Range`](/draft/range/overview) instance from the given random [`numbers`](#numbers-number) and the [`step`](#step-step).

{% code title="range.class.ts" %}

```typescript
public static createFrom<Step extends number = 1>(
  numbers: number[],
  step: Step = 1 as Step
): Range<number, number, Step> {
  return Range.create(
    Math.min.apply(0, numbers),
    Math.max.apply(0, numbers),
    step
  );
}
```

{% endcode %}

### Generic type variables

#### <mark style="color:green;">`Step`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)`= 1`

A generic type variable constrained by the [`number`](https://www.typescriptlang.org/docs/handbook/basic-types.html#number), by default of the value equal to **`1`**, optionally **captured** from the supplied [`step`](#step-step) indicates the range step type of a new [`Range`](/draft/range/overview) instance.

### Parameters

#### `numbers:`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)`[]`

An [`Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) of numbers to find a range and create a new instance.

#### `step:`<mark style="color:green;">`Step`</mark>

Optional step of generic type variable [`Step`](#stepextendsnumber-1) to set with a new [`Range`](/draft/range/overview) instance, by default **`1`**.

### Return type

#### [<mark style="color:green;">`Range`</mark>](/draft/range/overview)`<`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)`,`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)`,`[<mark style="color:green;">`Step`</mark>](#stepextendsnumber-1)`>`

The **return type** is the [`Range`](/draft/range/overview) object that takes generic type variable [`Step`](#stepextendsnumber-1).

### Returns

The **return value** is the [`Range`](/draft/range/overview) instance created from the given required random [numbers](#numbers-number) and the optional [step](#step-step).

## Example usage

```typescript
// Example usage.
import { Range } from '@angular-package/range';

// Returns Range {min: 4, max: 27} of type Range<number, number, 1>.
Range.createFrom([12, 14, 5, 23, 14, 27, 17, 4, 11, 12]);

// Returns Range {min: 4, max: 27} of type Range<number, number, 1.5>.
Range.createFrom([12, 14, 5, 23, 14, 27, 17, 4, 11, 12]);
```


# static createMaximum()

Returns the \`Maximum\` instance of the given maximum value

## `Range.createMaximum()`

The static `createMaximum()` method returns the [`Maximum`](/draft/maximum/overview) instance of the given **maximum** [`value`](#value-value).

{% code title="range.class.ts" %}

```typescript
public static createMaximum<Value extends number>(
  value: Value
): Maximum<Value> {
  return Maximum.create(value);
}
```

{% endcode %}

### Generic type variables

#### <mark style="color:green;">`Value`</mark>`extends`<mark style="color:green;">`number`</mark>

​A generic type variable constrained by the [`number`](https://www.typescriptlang.org/docs/handbook/basic-types.html#number), by default of the value **captured** from the supplied [`value`](#value-value) indicates the [primitive value](https://range.angular-package.dev/draft/range/methods/pages/cQeUkF2Fkx0vAOXl7QtX#maximum.prototype.valueof) type of a new [`Maximum`](/draft/maximum/overview) instance.

### Parameters

#### `value:`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)

The **maximum** range of a generic type variable [`Value`](#valueextendsnumber) to set with a new instance of [`Maximum`](/draft/maximum/overview).

### Return type

#### [<mark style="color:green;">`Maximum`</mark>](/draft/maximum/overview)`<`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)`>`

The **return type** is the [`Maximum`](/draft/maximum/overview) object that takes generic type variable [`Value`](#valueextendsnumber).

### Returns

The **return value** is the [`Maximum`](/draft/maximum/overview) instance with the [primitive value](https://range.angular-package.dev/draft/range/methods/pages/cQeUkF2Fkx0vAOXl7QtX#maximum.prototype.valueof) from the given [`value`](#value-value).

## Example usage

```typescript
// Example usage.
import { Range } from '@angular-package/range';

// Returns Maximum {27} of Maximum<27>.
Range.createMaximum(27);
```


# static createMinimum()

Returns the \`Minimum\` instance of the given minimum value

## `Range.createMinimum()`

The static `createMinimum()` method returns the [`Minimum`](/draft/minimum/overview) instance of the given **minimum** [`value`](#value-value).

{% code title="range.class.ts" %}

```typescript
public static createMinimum<Value extends number>(
  value: Value
): Minimum<Value> {
  return Minimum.create(value);
}
```

{% endcode %}

### Generic type variables

#### <mark style="color:green;">`Value`</mark>`extends`<mark style="color:green;">`number`</mark>

​A generic type variable constrained by the [`number`](https://www.typescriptlang.org/docs/handbook/basic-types.html#number), by default of the value **captured** from the supplied [`value`](#value-value) indicates the [primitive value](https://range.angular-package.dev/draft/range/methods/pages/EVBRc6yvosmzogLoQiK2#minimum.prototype.valueof) type of a new [`Minimum`](/draft/minimum/overview) instance.

### Parameters

#### `value:`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)

The **minimum** range of a generic type variable [`Value`](#valueextendsnumber) to set with a new instance of [`Minimum`](/draft/minimum/overview).

### Return type

#### [<mark style="color:green;">`Minimum`</mark>](/draft/minimum/overview)`<`[<mark style="color:green;">`Value`</mark>](#valueextendsnumber)`>`

The **return type** is the [`Minimum`](/draft/minimum/overview) object that takes generic type variable [`Value`](#valueextendsnumber).

### Returns

The **return value** is the [`Minimum`](/draft/minimum/overview) instance with the [primitive value](https://range.angular-package.dev/draft/range/methods/pages/EVBRc6yvosmzogLoQiK2#minimum.prototype.valueof) from the given [`value`](#value-value).

## Example usage

```typescript
// Example usage.
import { Range } from '@angular-package/range';

// Returns Minimum {4} of Minimum<4>.
Range.createMinimum(4);
```


# static isRange()

Checks whether the value is an instance of \`Range\` of any or the given minimum, maximum, and step

## `Range.isRange()`

The static `isRange()` method checks whether the [`value`](#value-any) is an instance of [`Range`](/draft/range/overview) of any or the given [**minimum**](#min-min), [**maximum**](#max-max) range and [step](#step-step).

{% code title="range.class.ts" %}

```typescript
public static isRange<
  Min extends number,
  Max extends number,
  Step extends number
>(
  value: any,
  min?: Min,
  max?: Max,
  step?: Step
): value is Range<Min, Max, Step> {
  return typeof value === 'object' && value instanceof this
    ? (typeof min === 'number' ? value.min === min : true) &&
        (typeof max === 'number' ? value.max === max : true) &&
        (typeof step === 'number' ? value.step === step : true)
    : false;
}
```

{% endcode %}

### Generic type variables

#### <mark style="color:green;">`Min`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

A generic type variable constrained by the [`number`](https://www.typescriptlang.org/docs/handbook/basic-types.html#number), by default of the value **captured** from the supplied [`min`](#min-min) indicates the **minimum** range type via the [return type](#return-type).

#### <mark style="color:green;">`Max`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

A generic type variable constrained by the [`number`](https://www.typescriptlang.org/docs/handbook/basic-types.html#number), by default of the value **captured** from the supplied [`max`](#max-max) indicates the **maximum** range type via the [return type](#return-type).

#### <mark style="color:green;">`Step`</mark>`extends`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)

A generic type variable constrained by the [`number`](https://www.typescriptlang.org/docs/handbook/basic-types.html#number), by default of the value equal to **`1`**, optionally **captured** from the supplied [`step`](#step-step) indicates the range step type via [return type](#return-type).

### Parameters

#### `value:`[<mark style="color:green;">`any`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#any)

The value of [`any`](https://www.typescriptlang.org/docs/handbook/basic-types.html#any) type to test against the [`Range`](/draft/range/overview) instance.

#### `min?:`[<mark style="color:green;">`Min`</mark>](#minextendsnumber)

The optional **minimum** range of generic type variable [`Min`](#minextendsnumber) to check whether it's equal to a **minimum** of the given [`value`](#value-any).

#### `max?:`[<mark style="color:green;">`Max`</mark>](#minextendsnumber-1)

The optional **maximum** range of generic type variable [`Max`](#maxextendsnumber) to check whether it's equal to a **maximum** of the given [`value`](#value-any).

#### `step?:`[<mark style="color:green;">`Step`</mark>](#stepextendsnumber-1)

Optional step of generic type variable [`Step`](#stepextendsnumber) to check whether it's equal to the step of the given [`value`](#value-any).

### Return type

#### `value is`[<mark style="color:green;">`Range`</mark>](/draft/range/overview)`<`[<mark style="color:green;">`Min`</mark>](#minextendsnumber)`,`[<mark style="color:green;">`Max`</mark>](#maxextendsnumber)`,`[<mark style="color:green;">`Step`</mark>](#stepextendsnumber)`>`

The **return type** is a [`boolean`](https://www.typescriptlang.org/docs/handbook/basic-types.html#boolean) resulting from its statement indicating the [`value`](#value-any) is the [`Range`](/draft/range/overview) object that takes the generic type variable [`Min`](#minextendsnumber), [`Max`](#maxextendsnumber) and [`Step`](#stepextendsnumber).

### Returns

The **return value** is a [`boolean`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) indicating whether the provided [`value`](#value-any) is an instance of [`Range`](/draft/range/overview) of any or the given [minimum](#min-min), [maximum](#max-max) range and [`step`](#step-step).

## Example usage

```typescript
// Example usage.
import { Range } from '@angular-package/range';

// Create new instance.
const range = new Range(4, 27, 1.5);

// Returns true of type value is Range<number, number, number>
Range.isRange(range);

// Returns true of type value is Range<4, number, number>
Range.isRange(range, 4);

// Returns true of type value is Range<4, 27, number>
Range.isRange(range, 4, 27);

// Returns true of type value is Range<4, 27, 1.5>
Range.isRange(range, 4, 27, 1.5);

// Returns false of type value is Range<3, number, number>
Range.isRange(range, 3);

// Returns false of type value is Range<3, 26, number>
Range.isRange(range, 3, 26);

// Returns false of type value is Range<3, 26, 1.0>
Range.isRange(range, 3, 26, 1.0);

// Returns true of type value is Range<number, 27, number>
Range.isRange(range, undefined, 27);

// Returns true of type value is Range<number, number, 1.5>
Range.isRange(range, undefined, undefined, 1.5);
```


# ↓ Instance

The \`Range\` primitive wrapper object instance methods

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |                                                                                                                                                                                                                                                                                                                                                                                                |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>public</strong> <a href="/pages/9IXA1BpZcHLCKRBYTkkD"><strong>forEachStep()</strong></a>: <mark style="color:green;">this</mark><br>Performs the specified action for each step in the <a href="/pages/axyOCaYA3ZNCNCFu5va6">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="/pages/KY2K1sTYmkccTpci8kfM"><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="/pages/UGBxh1tB0YNadfDcttUF">minimum</a> to the current <a href="/pages/K3Di7Lb1PzkbEN0Iwo3M">value</a> by the <a href="/pages/MLb0oEuCazKVOozjKbw0"><code>step</code></a> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                     |
| <p><strong>public</strong> <a href="/pages/X1kL1HvQtpi1Zmy2ybuD"><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="/pages/K3Di7Lb1PzkbEN0Iwo3M">value</a>.</p>                                                                                                                                                                                                                                                              |
| <p><a href="/pages/OtGsebfmmgxwodFETxTk#undefined"><mark style="color:red;">⚠</mark></a> <strong>public</strong> <a href="/pages/LFoaENTZmdqtBTzXQIgt"><strong>getMax()</strong></a>: <mark style="color:green;">Max</mark><br>Gets the <strong>maximum</strong> range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><a href="/pages/OtGsebfmmgxwodFETxTk#undefined"><mark style="color:red;">⚠</mark></a> <strong>public</strong> <a href="/pages/QhlVVRehZHqa5bcbA1rd"><strong>getMin()</strong></a>: <mark style="color:green;">Min</mark><br>Gets the <strong>minimum</strong> range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/dXvAlbtLbzaj3w9i2tZv"><strong>getRange()</strong></a>: <mark style="color:green;">number</mark>\[]<br>Returns range of numbers from <a href="/pages/UGBxh1tB0YNadfDcttUF">minimum</a> to the given <a href="/pages/dXvAlbtLbzaj3w9i2tZv#value-number-this.max"><code>value</code></a> with the <a href="/pages/MLb0oEuCazKVOozjKbw0"><code>step</code></a> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/l2xYQPkijNVkX8miZv7c"><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="/pages/MLb0oEuCazKVOozjKbw0"><code>step</code></a> from the <a href="/pages/UGBxh1tB0YNadfDcttUF">minimum</a> to the given <a href="/pages/l2xYQPkijNVkX8miZv7c#step-number"><code>step</code></a> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p> |
| <p><strong>public</strong> <a href="/pages/FDN16aYE4SyjCiID2CBR"><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="/pages/FDN16aYE4SyjCiID2CBR#step-number"><code>step</code></a>.</p>                                                                                                                                                                                                                               |
| <p><strong>public</strong> <a href="/pages/rB7CXMnw17TwjN6uKBAO"><strong>has()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/rB7CXMnw17TwjN6uKBAO#value-number"><code>value</code></a> is in the range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/RBfEX2Ue9lGCEUX8HgIp"><strong>hasEvery()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether every value of the given <a href="/pages/RBfEX2Ue9lGCEUX8HgIp#...values-number"><code>values</code></a> is in the range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/btdZ4Qh7QdlmIZWnmXrN"><strong>hasSome()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether some <a href="/pages/btdZ4Qh7QdlmIZWnmXrN#...values-number"><code>values</code></a> are in the range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                                                                                                                  |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/cOZk3IZ47dgLWxri6X3t"><strong>isBetween()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether range of the given <a href="/pages/cOZk3IZ47dgLWxri6X3t#min-number"><code>min</code></a> and <a href="/pages/cOZk3IZ47dgLWxri6X3t#max-number"><code>max</code></a> is between the range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/xUAw8v9sZBu77tIqcfOA"><strong>isBetweenEvery()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object is between every range of the given <a href="/pages/xUAw8v9sZBu77tIqcfOA#...ranges-number-number"><code>ranges</code></a>.</p>                                                                                                                                                                            |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/MoZjsKLwzky7aZw9h2qv"><strong>isBetweenSome()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the range of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object is between <strong>some</strong> given <a href="/pages/MoZjsKLwzky7aZw9h2qv#...ranges-number-number"><code>ranges</code></a>.</p>                                                                                                                                                                          |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/hi6jxvIdrkSjpisiGc03"><strong>maxGreaterThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/hi6jxvIdrkSjpisiGc03#value-number"><code>value</code></a> is <strong>less</strong> than the <a href="/pages/axyOCaYA3ZNCNCFu5va6"><strong>maximum</strong></a> <strong>range</strong> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                      |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/KIMEBubWprHAFOUMAhyG"><strong>maxLessThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/KIMEBubWprHAFOUMAhyG#value-number"><code>value</code></a> is greater than the <a href="/pages/axyOCaYA3ZNCNCFu5va6"><strong>maximum</strong></a> <strong>range</strong> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/8c0RUMIfKHusI44Mqj0h"><strong>minGreaterThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/8c0RUMIfKHusI44Mqj0h#value-number"><code>value</code></a> is <strong>less</strong> than a <a href="/pages/UGBxh1tB0YNadfDcttUF"><strong>minimum</strong></a> <strong>range</strong> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                        |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/LNl7lsrUbsA0yBXoSwh9"><strong>minLessThan()</strong></a>: <mark style="color:green;">boolean</mark><br>Checks whether the <a href="/pages/LNl7lsrUbsA0yBXoSwh9#value-number"><code>value</code></a> is greater than the <a href="/pages/UGBxh1tB0YNadfDcttUF"><strong>minimum</strong></a> <strong>range</strong> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                       |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/s8Imcz2PSbof3rBZDFGi"><strong>setValue()</strong></a>: <mark style="color:green;">this</mark><br>Sets the range <a href="/pages/K3Di7Lb1PzkbEN0Iwo3M"><code>value</code></a> between the <a href="/pages/UGBxh1tB0YNadfDcttUF">minimum</a> and <a href="/pages/axyOCaYA3ZNCNCFu5va6#range.prototype.max">maximum</a> of a specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object.</p>                                                                                                                    |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/gBq19svkE9PP7Ocpylxd"><strong>setValueToStep()</strong></a>: <mark style="color:green;">this</mark><br>Sets the <a href="/pages/K3Di7Lb1PzkbEN0Iwo3M"><code>value</code></a> of the specified <a href="/pages/WZLUQpD9Ues7IGjhopYg"><code>Range</code></a> object to the value of the given <a href="/pages/gBq19svkE9PP7Ocpylxd#step-number"><code>step</code></a>.</p>                                                                                                                                                        |                                                                                                                                                                                                                                                                                                                                                                                                |
| <p><strong>public</strong> <a href="/pages/Fcuv6FIbkJXNWgz4Wxw8"><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="/pages/OtGsebfmmgxwodFETxTk#undefined"><mark style="color:red;">⚠</mark></a> <strong>public</strong> <a href="/pages/GJqGdZJ82JGz4XJZvwRB"><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="/pages/OtGsebfmmgxwodFETxTk#undefined"><mark style="color:red;">⚠</mark></a> <strong>public</strong> <a href="/pages/pAvLgk7tvMGKtjf2J13G#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="/pages/hVzjtjutjQy5nmHoH46a"><code>Minimum</code></a> and <a href="/pages/FsmzzwAsU4wnhzR6Owkf"><code>Maximum</code></a> instances.</p> |                                                                                                                                                                                                                                                                                                                                                                                                |


# forEachStep()

Performs the specified action for each step in the maximum range of an \`Array\`

## `Range.prototype.forEachStep()`

The `forEachStep()` method performs the specified action for each step in the [maximum](/draft/range/properties/max) range of an [`Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array).

{% code title="range.class.ts" %}

```typescript
public forEachStep(
  forEachStep: (value: number, step: number, range: readonly number[]) => void
): this {
  this.range.forEach(forEachStep);
  return this;
}
```

{% endcode %}

### Parameters

#### `forEachStep: (value:`<mark style="color:green;">`number`</mark>`, step:`<mark style="color:green;">`number`</mark>`, range: readonly`<mark style="color:green;">`number`</mark>`[]) => void`&#x20;

A function that accepts up to three arguments. It's called one time for each step in the range.

### Return type

#### [<mark style="color:green;">`this`</mark>](/draft/range/overview)

### Returns

The **return value** is the [`Range`](/draft/range/overview) instance.

## Example usage

### Maximum range

```typescript
// Example usage.
import { Range } from '@angular-package/range';

// Create new instance.
// Returns Range {min: 3, max: 9} of Range<3, 9, 3>.
const range = new Range(3, 9, undefined, 3);

range.forEachStep((value, step, r) => {
  // 4 - 5.5 - 7 - 8.5 - 10
  value;
  // 0 - 1 - 2 - 3 - 4
  step;
  // (5) [4, 5.5, 7, 8.5, 10]
  r;
});
```


# getCurrentRange()

Returns a range of numbers from minimum to the current value by the step of a specified \`Range\` object

## `Range.prototype.getCurrentRange()`

The `getCurrentRange()` method returns a range of numbers from [minimum](/draft/range/properties/min) to the current [`value`](/draft/range/accessors/value) by the [`step`](/draft/range/accessors/get-step) of a specified [`Range`](/draft/range/overview) object.

{% code title="range.class.ts" %}

```typescript
public getCurrentRange(): Readonly<Array<number>> | undefined {
  return typeof this.value === 'number'
    ? this.getRange(this.value)
    : undefined;
}
```

{% endcode %}

### Return type

#### [<mark style="color:green;">`Readonly`</mark>](https://www.typescriptlang.org/docs/handbook/utility-types.html#readonlytype)`<`[<mark style="color:green;">`Array`</mark>](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#arrays)`<`[<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)`>> |`[<mark style="color:green;">`undefined`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#null-and-undefined)

### Returns

The **return value** is a range of numbers of a read-only [`Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) from [minimum](/draft/range/properties/min) to the current [`value`](/draft/range/accessors/value), if the current [`value`](/draft/range/accessors/value) is set, otherwise [`undefined`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined).

## Example usage

```typescript
// Example usage.
import { Method } from '@angular-package/range';

// Create new instance.
// Returns Range {min: 3, max: 27, value: 10} of Range<3, 27, 3>.
const range = new Range(3, 27, 10, 3);

// Get entire range.
// Returns (9) [3, 6, 9, 12, 15, 18, 21, 24, 27]
range.range;

// Returns (3) [3, 6, 9]
range.getCurrentRange();
```


# getCurrentStep()

Returns the step of the range value

## `Range.prototype.getCurrentStep()`

The `getCurrentStep()` method returns the step of the range [value](/draft/range/accessors/value).

{% code title="range.class.ts" %}

```typescript
public getCurrentStep(): number | undefined {
  return typeof this.value === 'number'
    ? Math.floor(this.value / this.#step)
    : undefined;
}
```

{% endcode %}

### Return type

#### [<mark style="color:green;">`number`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#number)`|`[<mark style="color:green;">`undefined`</mark>](https://www.typescriptlang.org/docs/handbook/basic-types.html#null-and-undefined)

### Returns

The **return value** is the step of [`number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) type, if range [value](/draft/range/accessors/value) is set, otherwise [`undefined`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined).

## Example usage

```typescript
// Example usage.
import { Method } from '@angular-package/range';

// Create new instance.
// Returns Range {min: 3, max: 27, value: 10} of Range<3, 27, 3>.
const range = new Range(3, 27, 10, 3);

// Returns 3 of number | undefined.
range.getCurrentStep();
```




---

[Next Page](/llms-full.txt/1)

