CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
isNumber.d.mts26 linesDownload Raw Back to predicate
1/**2 * Checks if the given value is a number.3 *4 * This function tests whether the provided value is strictly a `number`.5 * It returns `true` if the value is a `number`, and `false` otherwise.6 *7 * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `number`.8 *9 * @param {unknown} x - The value to test if it is a number.10 * @returns {x is number} True if the value is a number, false otherwise.11 *12 * @example13 *14 * const value1 = 123;15 * const value2 = 'abc';16 * const value3 = true;17 *18 * console.log(isNumber(value1)); // true19 * console.log(isNumber(value2)); // false20 * console.log(isNumber(value3)); // false21 *22 */23declare function isNumber(x: unknown): x is number;24 25export { isNumber };26 
basant307/AI_Governance_Project · CoolFace