Manage RE2 support for performance and ReDoS protection
masterThe library uses the re2 regex engine by default for better performance and protection against Regular Expression Denial of Service (ReDoS). It automatically falls back to native JavaScript RegExp if re2 is unavailable.
If you encounter native compilation issues or wish to exclude it, you can uninstall it. If you upgrade Node.js, you may need to rebuild the re2 dependency.
# To exclude RE2
npm uninstall re2
# To rebuild RE2 after a Node.js upgrade
npm rebuild re2