swc/bundler/tests/.cache/deno/cbf633d8fb10f64d13c5969a7822ff777f8c4d3e.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

16 lines
373 B
TypeScript

// Loaded from https://deno.land/x/segno@v1.1.0/lib/validations/isHexColor.ts
// @ts-ignore allowing typedoc to build
import { assertString } from '../helpers/assertString.ts';
/**
* @ignore
*/
const hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;
export const isHexColor = (str: string) => {
assertString(str);
return hexcolor.test(str);
};