lessThanSome()

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

Inequality.prototype.lessThanSome()

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

inequality.class.ts
public greaterThanSome(...values: number[]): boolean {
  return this.#greater.thanSome(...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 some 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.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);

Last updated