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

inequality.class.ts
public lessThanEvery(...values: number[]): boolean {
  return this.#less.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 less 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.lessThanEvery(1982, 1983, 1984, 1985);

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

Last updated