Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 | 57x 57x 1290x 57x 57x | import type {CharPredicate} from './types'; const LETTER_REGEX = /(\p{Letter}|\d)/u; const WHITESPACE_REGEX = /\s/; export const isLetter: CharPredicate<string> = (char: string) => LETTER_REGEX.test(char[0]); export const isWhitespace: CharPredicate<string> = (char: string) => WHITESPACE_REGEX.test(char[0]); export const isPunctuation: CharPredicate<string> = (char: string) => !isLetter(char) && !isWhitespace(char); |