We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b54ec63 commit 9b39e59Copy full SHA for 9b39e59
src/constructs/regex.ts
@@ -9,14 +9,9 @@ export interface Regex extends RegexConstruct {
9
}
10
11
export function regex(sequence: RegexSequence): Regex {
12
- const children = ensureArray(sequence);
13
- if (children.length === 0) {
14
- throw new Error('`regex` should receive at least one element');
15
- }
16
-
17
return {
18
type: 'sequence',
19
- children,
+ children: ensureArray(sequence),
20
encode: encodeRegex,
21
};
22
0 commit comments