{"name":"path-match","version":"1.0.0","keywords":["route","router","routing","path","regex","regexp","param","params"],"author":{"url":"http://jongleberry.com","name":"Jonathan Ong","email":"me@jongleberry.com"},"license":"MIT","_id":"path-match@1.0.0","maintainers":[{"name":"jongleberry","email":"jonathanrichardong@gmail.com"}],"homepage":"https://github.com/expressjs/path-match","bugs":{"url":"https://github.com/expressjs/path-match/issues"},"dist":{"shasum":"7da44edcd087c2128a9ca812b9ae7faabd12d2af","tarball":"http://registry-npm.ywwl.com/path-match/download/path-match-1.0.0.tgz","integrity":"sha512-tP87JxFZMS3wFTREiJHdGl+U3bKN5SHrWLiCNvQYJcfQXKjrjV+mGrj9FXwkj9td0jLbqElh25EQ5B+Qa311fg==","signatures":[{"sig":"MEUCIFTkJ07Im4D2Jngu3xCMmZYzEPl1YdIAPTV8KRiH2UvXAiEAjC+1uHVTb+UGfXLzMkDhV23E4jDqUdNUCbAxkUGEGuA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":1854,"noattachment":false,"key":"/path-match/-/path-match-1.0.0.tgz"},"_from":".","scripts":{"test":"mocha --reporter spec"},"_npmUser":{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},"repository":{"url":"git://github.com/expressjs/path-match","type":"git"},"_npmVersion":"1.4.6","description":"wrapper around path-to-regexp for easy route parameters","directories":{},"dependencies":{"path-to-regexp":"*"},"devDependencies":{"mocha":"*"},"readme":"# path match\n\n[![NPM version][npm-image]][npm-url]\n[![Build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![Dependency Status][david-image]][david-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\nThin wrapper around [path-to-regexp](https://github.com/component/path-to-regexp) to make extracting the param names easier.\n\n```js\nvar route = require('path-match')({\n  // path-to-regexp options\n  sensitive: false,\n  strict: false,\n  end: false,\n});\n\n// create a match function from a route\nvar match = route('/post/:id');\n\n// match a route\nvar parse = require('url').parse;\nrequire('http').createServer(function (req, res) {\n  var params = match(parse(req.url).pathname);\n\n  // no match\n  if (params === false) {\n    res.statusCode = 404;\n    res.end();\n    return;\n  }\n\n  // the matched id\n  var id = params.id;\n\n  // do stuff with the ID\n})\n```\n\n[npm-image]: https://img.shields.io/npm/v/path-match.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/path-match\n[github-tag]: http://img.shields.io/github/tag/pillarjs/path-match.svg?style=flat-square\n[github-url]: https://github.com/pillarjs/path-match/tags\n[travis-image]: https://img.shields.io/travis/pillarjs/path-match.svg?style=flat-square\n[travis-url]: https://travis-ci.org/pillarjs/path-match\n[coveralls-image]: https://img.shields.io/coveralls/pillarjs/path-match.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/pillarjs/path-match?branch=master\n[david-image]: http://img.shields.io/david/pillarjs/path-match.svg?style=flat-square\n[david-url]: https://david-dm.org/pillarjs/path-match\n[license-image]: http://img.shields.io/npm/l/path-match.svg?style=flat-square\n[license-url]: LICENSE.md\n[downloads-image]: http://img.shields.io/npm/dm/path-match.svg?style=flat-square\n[downloads-url]: https://npmjs.org/package/path-match\n","publish_time":1396686104669,"deprecated":"This package is archived and no longer maintained. For support, visit https://github.com/expressjs/express/discussions","_cnpm_publish_time":1396686104669,"dist-tags":{"latest":"1.2.4"}}