UNPKG

@technobuddha/library

Version:
16 lines (15 loc) 421 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isPunctuation = void 0; var re = /^(\p{P})+$/u; /** * Test a string for all punctuation characters * * @param input string to test * @return true, if all characters in the string are punctuation */ function isPunctuation(input) { return re.test(input); } exports.isPunctuation = isPunctuation; exports.default = isPunctuation;