@technobuddha/library
Version:
A large library of useful functions
16 lines (15 loc) • 421 B
JavaScript
;
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;