Strip a url to only match the `pathname`.
npm install pathname-matchStrip a url to only match the pathname. Weighs only 200 bytes gzipped.
bash
$ npm install pathname-match
`Usage
`js
const pathMatch = require('pathname-match')
const wayfarer = require('wayfarer')const router = wayfarer('/')
router.on('/', => console.log('home'))
router.on('/derp', => console.log('derp'))
router.on('/404', => console.log('not found'))
router.match(pathMatch('/derp/#foo?bin=baz'))
// => '/derp'
``[npm-image]: https://img.shields.io/npm/v/pathname-match.svg?style=flat-square
[npm-url]: https://npmjs.org/package/pathname-match
[travis-image]: https://img.shields.io/travis/yoshuawuyts/pathname-match.svg?style=flat-square
[travis-url]: https://travis-ci.org/yoshuawuyts/pathname-match
[coveralls-image]: https://img.shields.io/coveralls/yoshuawuyts/pathname-match.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/yoshuawuyts/pathname-match?branch=master
[downloads-image]: http://img.shields.io/npm/dm/pathname-match.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/pathname-match
[wayfarer]: https://github.com/yoshuawuyts/wayfarer