thanSome()
Checks whether the primitive value of a specified object is greater than some given values
Greater.prototype.thanSome()
Greater.prototype.thanSome()
Checks whether the primitive value of a specified object
is greater than some given values
.
public thanSome(...values: number[]): boolean {
return Array.isArray(values)
? values.some((value) => this.valueOf() < value)
: false;
}
Parameters
A rest parameter of the numbers to test.
Return type
Returns
The return value is a boolean
indicating whether the primitive value is greater than some given values
.
Example usage
// 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);
Last updated