swc/bundler/tests/.cache/deno/917d25b1356f5415c8ae59cf11feadb4b161d74a.ts
강동윤 bbaf619f63
fix(bundler): Fix bugs (#1437)
swc_bundler:
 - [x] Fix wrapped esms. (denoland/deno#9307)
 - [x] Make test secure.
2021-03-02 17:33:03 +09:00

20 lines
520 B
TypeScript

// Loaded from https://deno.land/x/segno@v1.1.0/lib/validations/isAlpha.ts
// @ts-ignore allowing typedoc to build
import { assertString } from '../helpers/assertString.ts';
// @ts-ignore allowing typedoc to build
import { alpha } from '../helpers/alpha.ts';
export const isAlpha = (str: string, locale = 'en-US') => {
assertString(str);
if (locale in alpha) {
return (alpha as any)[locale].test(str);
}
throw new Error(`Invalid locale '${locale}'`);
};
export const alphaLocales = Object.keys(alpha);