Files
30-seconds-of-code/node_modules/is-alphanumeric/index.js
2019-08-20 15:52:05 +02:00

9 lines
186 B
JavaScript

'use strict';
module.exports = function (str) {
if (typeof str !== 'string') {
throw new TypeError('Expected a string');
}
return !/[^0-9a-z\xDF-\xFF]/.test(str.toLowerCase());
};