CoolFace
Datasetpublic

basant307/AI_Governance_Project

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