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