matchex

0.1.0 • Public • Published

matchex

Match regular expressions in a routers like way

Usage:

const Matchex = require('matchex');
const matchex = new Matchex();
 
matchex.use('Match (.*) you want with matchex!', (all, word) => {
  console.log(all); // Match anything you want with matchex!
  console.log(word); // anything
});
 
matchex.run('Match anything you want with matchex!');

You can pass in an options parameter to use to make the matching case insensitive:

matchex.use('MATCH (.*) you WANT with matchex!', (all, word) => {
  console.log(all); // Match anything you want with matchex!
  console.log(word); // anything
}, { caseInsentive: true });
 
matchex.run('Match anything you want with matchex!');

Readme

Keywords

none

Package Sidebar

Install

npm i matchex

Weekly Downloads

2

Version

0.1.0

License

MIT

Last publish

Collaborators

  • hillmanov