我智商爆棚
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

13 lines
401 B

import assertString from './util/assertString';
import { alpha } from './alpha';
export default function isAlpha(str) {
var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US';
assertString(str);
if (locale in alpha) {
return alpha[locale].test(str);
}
throw new Error("Invalid locale '".concat(locale, "'"));
}
export var locales = Object.keys(alpha);