https://github.com/lcanady/mu-parser
A simple regex powered text parser.
https://github.com/lcanady/mu-parser
Last synced: 9 months ago
JSON representation
A simple regex powered text parser.
- Host: GitHub
- URL: https://github.com/lcanady/mu-parser
- Owner: lcanady
- License: mit
- Created: 2018-12-31T22:43:05.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-03T09:00:08.000Z (almost 7 years ago)
- Last Synced: 2024-10-25T22:45:54.697Z (about 1 year ago)
- Language: JavaScript
- Size: 405 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mu-Parser
A simple regex powered text parser system. When required in didfferent parts of your code, it retains a list of parsers created.
```JavaScript
parsers = require('mu-parser');
// create a new parser and add an ANSI terminal escape code substitution.
parsers('color').addRule(/%[CcXx]b/, '\u001b[34m');
//later in another module...
parsers = require('mu-parser');
parsers('color').parse('%cbThis text will be blue!'); // Returns blue text.
```