Interface FromRegexOptions

Hierarchy

  • FromRegexOptions

Properties

assertions?: "disable" | "ignore" | "throw"

How to handle assertions when construction the ENFA.

  • "throw"

    This method will throw an error when encountering an assertion.

  • "disable"

    This method will replace any assertion with an empty character class, effectively removing it.

  • "ignore"

    This method will replace any assertion with an empty group.

Default

"throw"
infinityThreshold?: number

The number at which the maximum of a quantifier will be assumed to be infinity.

Quantifiers with a large finite maximum (e.g. a{1,10000}) can create huge NFAs with thousands of states. Any Quantifier with a maximum greater or equal to this threshold will be assumed to be infinite.

Default

Infinity
unknowns?: "disable" | "throw"

How to handle unknowns when construction the ENFA.

  • "throw"

    This method will throw an error when encountering an unknown.

  • "disable"

    This method will replace any unknown with an empty character class, effectively removing it.

Default

"throw"