Skip to content

Conversation

@ericcornelissen
Copy link
Owner

Relates to #2122

Summary

Using a dedicated package I created for transparently creating regular expressions with the l flag (when available). This requires some refactoring to avoid significant performance overhead by pre-initializing the regular expressions in a closure which can than reuse it for repeated escaping.

For this proof of concept I just implemented it for one of the escape modules. Also, it is not tested yet as I did not figure out a way to run AVA tests with the --enable-experimental-regexp-engine flag.

... when available

Using a dedicated package I created for transparently creating regular
expressions with the `l` flag (when available). This requires some
refactoring to avoid significant performance overhead by pre-
initializing the regular expressions in a closure which can than reuse
it for repeated escaping.

For this proof of concept I just implemented it for one of the escape
modules. Also, it is not tested yet as I did not figure out a way to run
AVA tests with the `--enable-experimental-regexp-engine` flag.
@ericcornelissen ericcornelissen added dependencies Changes to the project's dependencies refactor Changes existing code without changing functionality labels Aug 21, 2025
@github-actions github-actions bot added test Relates to testing meta Relates to the project or repository itself labels Aug 21, 2025
@kusari-inspector

This comment was marked as spam.

@kusari-inspector

This comment was marked as spam.

@kusari-inspector

This comment was marked as spam.

@kusari-inspector

This comment was marked as spam.

@ericcornelissen
Copy link
Owner Author

Currently (as of 7a1ffc7) integration tests fail because @ericcornelissen/[email protected] is ESM-only, whereas the integration tests cover CJS as well.

@kusari-inspector

This comment was marked as spam.

@ericcornelissen ericcornelissen removed test Relates to testing meta Relates to the project or repository itself labels Sep 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Changes to the project's dependencies refactor Changes existing code without changing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant