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 of a child class instance is greater than every value of the given values.

inequality.class.ts
public greaterThanEvery(...values: number[]): boolean {
  return this.#greater.thanEvery(...values);
}

Parameters

...values:number[]

A rest parameter of the numbers to test.

Return type

Returns

The return value is a boolean indicating whether the primitive value of a child class instance is greater than every value of the given values.

Example usage

// 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);

Last updated