Interface ToRegexOptions

Hierarchy

  • ToRegexOptions

Properties

maxNodes?: number

The maximum number of RE AST nodes the implementation is allowed to create.

If the implementation has to create more nodes to create the RE, a TooManyNodesError will be thrown. This maximum will be check before any optimization passes.

Default

10000
maxOptimizationPasses?: number

The maximum number of optimization passes that will be done after the initial RE AST was created.

The initial AST is usually a lot more complex than necessary. Optimizations are then applied in order to minimize the AST until this limit is reached or the AST can be optimized no further.

The default number of passes is implementation defined.