# than()

## `Greater.prototype.than()`

Checks whether the [primitive value](https://docs.angular-package.dev/range-1/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](https://docs.angular-package.dev/range-1/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);
```
