0.1.0 • Published 7 years ago

matchex v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

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!');