{"_id":"pathname-match","_rev":"401939","name":"pathname-match","description":"Strip a url to only match the `pathname`.","dist-tags":{"latest":"1.2.0"},"maintainers":[{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"time":{"modified":"2021-08-04T04:33:57.000Z","created":"2014-12-23T01:03:14.851Z","1.2.0":"2016-08-28T14:23:49.557Z","1.1.3":"2016-01-31T03:10:34.374Z","1.1.2":"2016-01-23T03:50:54.757Z","1.1.1":"2016-01-23T03:46:36.485Z","1.1.0":"2015-08-05T03:52:50.458Z","1.0.0":"2014-12-23T01:03:14.851Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/yoshuawuyts/pathname-match.git"},"versions":{"1.2.0":{"name":"pathname-match","version":"1.2.0","description":"Strip a url to only match the `pathname`.","main":"index.js","scripts":{"test":"standard && NODE_ENV=test node test","test-cov":"NODE_ENV=test istanbul cover test.js"},"repository":{"type":"git","url":"git+https://github.com/yoshuawuyts/pathname-match.git"},"keywords":["path","match","strip","wayfarer"],"license":"MIT","dependencies":{},"devDependencies":{"istanbul":"^0.3.5","standard":"^5.0.0","tape":"^3.0.3"},"files":["LICENSE","index.js","README.md"],"gitHead":"d1fee8e415807c0da27fe879ae2163f54c56555c","bugs":{"url":"https://github.com/yoshuawuyts/pathname-match/issues"},"homepage":"https://github.com/yoshuawuyts/pathname-match#readme","_id":"pathname-match@1.2.0","_shasum":"77cb8e3db1e41e4771c4942a9e4fecb610cc2d19","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.4.0","_npmUser":{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"},"dist":{"shasum":"77cb8e3db1e41e4771c4942a9e4fecb610cc2d19","size":1961,"noattachment":false,"key":"/pathname-match/-/pathname-match-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pathname-match/download/pathname-match-1.2.0.tgz"},"maintainers":[{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/pathname-match-1.2.0.tgz_1472394227674_0.9237909228540957"},"directories":{},"publish_time":1472394229557,"_cnpm_publish_time":1472394229557,"_hasShrinkwrap":false},"1.1.3":{"name":"pathname-match","version":"1.1.3","description":"Strip a url to only match the `pathname`.","main":"index.js","scripts":{"test":"standard && NODE_ENV=test node test","test-cov":"NODE_ENV=test istanbul cover test.js"},"repository":{"type":"git","url":"git+https://github.com/yoshuawuyts/pathname-match.git"},"keywords":["path","match","strip","wayfarer"],"license":"MIT","dependencies":{},"devDependencies":{"istanbul":"^0.3.5","standard":"^5.0.0","tape":"^3.0.3"},"files":["LICENSE","index.js","README.md"],"gitHead":"d6b5eac9aa9e31e37631f5f5b304294b16a56a86","bugs":{"url":"https://github.com/yoshuawuyts/pathname-match/issues"},"homepage":"https://github.com/yoshuawuyts/pathname-match#readme","_id":"pathname-match@1.1.3","_shasum":"7c0f5644122ab62c6d741b2ef3451c10cdd24ca1","_from":".","_npmVersion":"3.5.2","_nodeVersion":"5.0.0","_npmUser":{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"},"dist":{"shasum":"7c0f5644122ab62c6d741b2ef3451c10cdd24ca1","size":1995,"noattachment":false,"key":"/pathname-match/-/pathname-match-1.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/pathname-match/download/pathname-match-1.1.3.tgz"},"maintainers":[{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"directories":{},"publish_time":1454209834374,"_cnpm_publish_time":1454209834374,"_hasShrinkwrap":false},"1.1.2":{"name":"pathname-match","version":"1.1.2","description":"Strip a url to only match the `pathname`.","main":"index.js","scripts":{"test":"standard && NODE_ENV=test node test","test-cov":"NODE_ENV=test istanbul cover test.js"},"repository":{"type":"git","url":"git+https://github.com/yoshuawuyts/pathname-match.git"},"keywords":["path","match","strip","wayfarer"],"license":"MIT","dependencies":{},"devDependencies":{"istanbul":"^0.3.5","standard":"^5.0.0","tape":"^3.0.3"},"files":["LICENSE","index.js","README.md"],"gitHead":"d369f3273f8cc7d15d2d4698c7805f0b1e5e3af9","bugs":{"url":"https://github.com/yoshuawuyts/pathname-match/issues"},"homepage":"https://github.com/yoshuawuyts/pathname-match#readme","_id":"pathname-match@1.1.2","_shasum":"380bbe64279906213209a75e8a321a1cdb37333a","_from":".","_npmVersion":"3.5.2","_nodeVersion":"5.0.0","_npmUser":{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"},"dist":{"shasum":"380bbe64279906213209a75e8a321a1cdb37333a","size":1985,"noattachment":false,"key":"/pathname-match/-/pathname-match-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/pathname-match/download/pathname-match-1.1.2.tgz"},"maintainers":[{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"directories":{},"publish_time":1453521054757,"_cnpm_publish_time":1453521054757,"_hasShrinkwrap":false},"1.1.1":{"name":"pathname-match","version":"1.1.1","description":"Strip a url to only match the `pathname`.","main":"index.js","scripts":{"test":"standard && NODE_ENV=test node test","test-cov":"NODE_ENV=test istanbul cover test.js"},"repository":{"type":"git","url":"git+https://github.com/yoshuawuyts/pathname-match.git"},"keywords":["path","match","strip","wayfarer"],"license":"MIT","dependencies":{},"devDependencies":{"istanbul":"^0.3.5","standard":"^5.0.0","tape":"^3.0.3"},"files":["LICENSE","index.js","README.md"],"gitHead":"9162d534b27895a52521a6d740d92b8472491d5f","bugs":{"url":"https://github.com/yoshuawuyts/pathname-match/issues"},"homepage":"https://github.com/yoshuawuyts/pathname-match#readme","_id":"pathname-match@1.1.1","_shasum":"b724a9669d6d8e3ba6c98f917407ac598fdb3edb","_from":".","_npmVersion":"3.5.2","_nodeVersion":"5.0.0","_npmUser":{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"},"dist":{"shasum":"b724a9669d6d8e3ba6c98f917407ac598fdb3edb","size":2000,"noattachment":false,"key":"/pathname-match/-/pathname-match-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/pathname-match/download/pathname-match-1.1.1.tgz"},"maintainers":[{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"directories":{},"publish_time":1453520796485,"_cnpm_publish_time":1453520796485,"_hasShrinkwrap":false},"1.1.0":{"name":"pathname-match","version":"1.1.0","description":"Strip a url to only match the `pathname`.","main":"index.js","scripts":{"test":"standard && NODE_ENV=test node test","test-cov":"NODE_ENV=test istanbul cover test.js"},"repository":{"type":"git","url":"git+https://github.com/yoshuawuyts/pathname-match.git"},"keywords":["path","match","strip","wayfarer"],"license":"MIT","dependencies":{},"devDependencies":{"istanbul":"^0.3.5","standard":"^5.0.0","tape":"^3.0.3"},"files":["LICENSE","index.js","README.md"],"gitHead":"f64905e2fabfcacf9c7f4be28540399cef101ebb","bugs":{"url":"https://github.com/yoshuawuyts/pathname-match/issues"},"homepage":"https://github.com/yoshuawuyts/pathname-match#readme","_id":"pathname-match@1.1.0","_shasum":"a9122c59d5929fce4f991fc1f4d95ded79ea8478","_from":".","_npmVersion":"2.13.2","_nodeVersion":"2.3.0","_npmUser":{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"},"dist":{"shasum":"a9122c59d5929fce4f991fc1f4d95ded79ea8478","size":1898,"noattachment":false,"key":"/pathname-match/-/pathname-match-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pathname-match/download/pathname-match-1.1.0.tgz"},"maintainers":[{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"directories":{},"publish_time":1438746770458,"_cnpm_publish_time":1438746770458,"_hasShrinkwrap":false},"1.0.0":{"name":"pathname-match","version":"1.0.0","description":"Strip a url to only match the `pathname`.","main":"index.js","scripts":{"test":"NODE_ENV=test tape test.js | tap-bail |tap-spec","test-cov":"NODE_ENV=test istanbul cover test.js","lint":"eslint ."},"repository":{"type":"git","url":"https://github.com/yoshuawuyts/pathname-match"},"keywords":["path","match","strip","wayfarer"],"license":"MIT","dependencies":{},"devDependencies":{"eslint":"^0.10.2","istanbul":"^0.3.5","tap-bail":"0.0.0","tap-spec":"^2.1.2","tape":"^3.0.3"},"files":["LICENSE","index.js","README.md"],"gitHead":"c041160a33bdcaec1a4ab6e45aaf83fd66dafaa4","bugs":{"url":"https://github.com/yoshuawuyts/pathname-match/issues"},"homepage":"https://github.com/yoshuawuyts/pathname-match","_id":"pathname-match@1.0.0","_shasum":"87d755e6a41f1ca5de8ca341810ced0da4f05850","_from":".","_npmVersion":"2.1.12","_nodeVersion":"0.10.33","_npmUser":{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"},"maintainers":[{"name":"yoshuawuyts","email":"i@yoshuawuyts.com"}],"dist":{"shasum":"87d755e6a41f1ca5de8ca341810ced0da4f05850","size":1926,"noattachment":false,"key":"/pathname-match/-/pathname-match-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pathname-match/download/pathname-match-1.0.0.tgz"},"directories":{},"publish_time":1419296594851,"_cnpm_publish_time":1419296594851,"_hasShrinkwrap":false}},"readme":"# pathname-match\n[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![Downloads][downloads-image]][downloads-url]\n\nStrip a url to only match the `pathname`. Weighs only 200 bytes gzipped.\n\n## Installation\n```bash\n$ npm install pathname-match\n```\n\n## Usage\n```js\nconst pathMatch = require('pathname-match')\nconst wayfarer  = require('wayfarer')\n\nconst router = wayfarer('/')\n\nrouter.on('/', => console.log('home'))\nrouter.on('/derp', => console.log('derp'))\nrouter.on('/404', => console.log('not found'))\n\nrouter.match(pathMatch('/derp/#foo?bin=baz'))\n// => '/derp'\n```\n\n## Why?\nIt's meant to feed the output to a router such as [wayfarer][wayfarer], and not\nhaving to worry about hashes in the url. This used to be part of wayfarer, but\nhas been stripped out to make the api even smaller.\n\n## See Also\n- [wayfarer][wayfarer]\n- [hash-match](https://github.com/sethvincent/hash-match)\n\n## License\n[MIT](https://tldrlegal.com/license/mit-license)\n\n[npm-image]: https://img.shields.io/npm/v/pathname-match.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/pathname-match\n[travis-image]: https://img.shields.io/travis/yoshuawuyts/pathname-match.svg?style=flat-square\n[travis-url]: https://travis-ci.org/yoshuawuyts/pathname-match\n[coveralls-image]: https://img.shields.io/coveralls/yoshuawuyts/pathname-match.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/yoshuawuyts/pathname-match?branch=master\n[downloads-image]: http://img.shields.io/npm/dm/pathname-match.svg?style=flat-square\n[downloads-url]: https://npmjs.org/package/pathname-match\n\n[wayfarer]: https://github.com/yoshuawuyts/wayfarer\n","_attachments":{},"homepage":"https://github.com/yoshuawuyts/pathname-match#readme","bugs":{"url":"https://github.com/yoshuawuyts/pathname-match/issues"},"license":"MIT"}