A module for testing URLs against Chrome and Firefox match patterns.
npm install url-match-patternsA node module for testing URLs against match patterns, as defined by
Google and
Mozilla.
``js
import match from 'url-match-patterns';
// check that a url matches
match(':///', 'https://www.example.com'); // true
// or build a reusable function
const matches = match(':///');
matches('https://www.example.com'); // true
`
##### match(pattern, url) -> Booleantrue
Compares a pattern against a URL. Returns if the pattern matchesfalse
or if it doesn't. Will throw an AssertionError if your pattern
is invalid.
##### match(pattern) -> FunctionAssertionError` if your pattern
Create a reusable match function for a pattern. This will be faster since
it only has to initialize once. Will throw an
is invalid.