hkt-toolbelt
Version:
Functional and composable type utilities
19 lines (18 loc) • 468 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isUppercaseLetter = void 0;
/**
* Given a string, return a boolean indicating whether the string is an
* uppercase letter.
*
* @param {string} x - The string to check.
*
* @example
* ```ts
* import { String } from "hkt-toolbelt";
*
* const result = String.isUppercaseLetter('A')
* // ^? true
* ```
*/
exports.isUppercaseLetter = ((x) => x.match(/^[A-Z]$/) !== null);