9 lines
186 B
JavaScript
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());
|
|
};
|