ReX.js is a helper library written in TypeScript for writing Regular Expressions. Yesterday, ReX.js v1.0.0, the first major version was released. Being written in TypeScript, it provides great autocompletion and development experience across various modern code editors. One of the main advantages of using ReX.js is its ability to document every line of code without hassles.
ReX.js is structured as namespace consisting of the following modules:
The GitHub page says that the Matcher and Replacer classes will be used more likely by developers. The other classes would more likely be used for extendability and advanced use cases.
Beyond basic Regex operations, ReX.js also provides options for extending its functionality.
Every method used in ReX.js is just adding a new Operation to ReXer. An Operation can then be stringified using its own stringify method.
A concept of channels is introduced to construct linear Regexps from nested function expressions. A channel is simply an array of Operations. The channels themselves are stored as an array in ReXer.
Snippets are available if you want to reuse any kind of Operation configuration. Snippets provide an option to assign the given config to a name for later reuse.
Methods are ways to reuse and apply custom operations while extensions are just arrays of methods.
ReX.js is available on NPM as a package. You can include it in your current project by using:
npm install @areknawo/rex
If you’re using Yarn, then use the following command:
yarn add @areknawo/rex
For more details and documentation, visit the ReX.js GitHub page.
Manipulating text data using Python Regular Expressions (regex)
Introducing Howler.js, a Javascript audio library with full cross-browser support
low.js, a Node.js port for embedded systems