gt
lang
Checks if value is greater than other.
Installation
Import
import { gt } from '@tulx/utils';Source Code
Implementation
/**
* Checks if value is greater than other.
*
* @param value - The value to compare.
* @param other - The other value to compare.
* @returns Returns true if value is greater than other, else false.
*
* @example
* ```ts
* gt(3, 1); // true
* gt(3, 3); // false
* gt(1, 3); // false
* ```
*/
export function gt(value: number | string, other: number | string): boolean {
return value > other;
}
Example
import { gt } from '@tulx/utils';
gt(3, 1); // true
gt(3, 3); // false
gt(1, 3); // falseRelated Functions
castArray
Casts value as an array if it's not one.
clone
Creates a shallow clone of value.
cloneDeep
This method is like clone except that it recursively clones value.
cloneDeepWith
This method is like cloneDeep except that it accepts customizer which is invoked to produce the cloned value.
cloneWith
This method is like clone except that it accepts customizer which is invoked to produce the cloned value.
conformsTo
Checks if object conforms to source by invoking the predicate properties of source with the corresponding property values of object.