You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

12 lines
576 B

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isPunctuation = exports.isWhitespace = exports.isLetter = void 0;
const LETTER_REGEX = /(\p{Letter}|\d)/u;
const WHITESPACE_REGEX = /\s/;
const isLetter = (char) => LETTER_REGEX.test(char[0]);
exports.isLetter = isLetter;
const isWhitespace = (char) => WHITESPACE_REGEX.test(char[0]);
exports.isWhitespace = isWhitespace;
const isPunctuation = (char) => !(0, exports.isLetter)(char) && !(0, exports.isWhitespace)(char);
exports.isPunctuation = isPunctuation;
//# sourceMappingURL=util.js.map