{"_id":"path-to-url","_rev":"7-88dfb18c9f05440bd0599729b1baf0c7","name":"path-to-url","description":"Turn an Express-style path string such as /user/:name into a URL","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.1":{"name":"path-to-url","version":"0.0.1","description":"Turn an Express-style path string such as /user/:name into a URL","main":"lib/path-to-url.js","directories":{"test":"test"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/brentburgoyne/path-to-url.git"},"keywords":["Express","Route","Routing","Router","Reverse","URL","path","params"],"author":{"name":"Brent Burgoyne"},"license":"MIT","bugs":{"url":"https://github.com/brentburgoyne/path-to-url/issues"},"homepage":"https://github.com/brentburgoyne/path-to-url","devDependencies":{"should":"^3.3.1","mocha":"^1.18.2"},"_id":"path-to-url@0.0.1","dist":{"shasum":"c1f9df2ea9af6968397ee6c76bc9f2bf5781d3ff","tarball":"https://registry.npmjs.org/path-to-url/-/path-to-url-0.0.1.tgz","integrity":"sha512-24CDlyCZaWMw/ThHWcaVuSxTM5qZy5rGf0kdyUOPYCHPHoJCGiGHIL7U71lqiY2D8SyQqDtDJMqWWf8rdAZIqA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHv4O5P5+8fqyVf1SKsvMX2oABDRvSx/hoduTa1TC5DrAiBAxvK2G2HmHItkBCabBLjssGA6IZCwKb2p6I4XI1ho+w=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"brentburgoyne","email":"brent47@gmail.com"},"maintainers":[{"name":"brentburgoyne","email":"brent47@gmail.com"}]},"0.1.0":{"name":"path-to-url","version":"0.1.0","description":"Turn an Express-style path string such as /user/:name into a URL","main":"lib/path-to-url.js","directories":{"test":"test"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git://github.com/brentburgoyne/path-to-url.git"},"keywords":["Express","Route","Routing","Router","Reverse","URL","path","params"],"author":{"name":"Brent Burgoyne"},"license":"MIT","bugs":{"url":"https://github.com/brentburgoyne/path-to-url/issues"},"homepage":"https://github.com/brentburgoyne/path-to-url","devDependencies":{"should":"^3.3.1","mocha":"^1.18.2"},"_id":"path-to-url@0.1.0","_shasum":"74543d67d5cb523772a6615557b61ea19427fc56","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"brentburgoyne","email":"brent47@gmail.com"},"maintainers":[{"name":"brentburgoyne","email":"brent47@gmail.com"}],"dist":{"shasum":"74543d67d5cb523772a6615557b61ea19427fc56","tarball":"https://registry.npmjs.org/path-to-url/-/path-to-url-0.1.0.tgz","integrity":"sha512-DxBVUlgIw+1FxScYBqGhChzVHahc68gBVrIR0VhBv5gnSrzr5smi3vX4BhsZUVn32SsAIEZuV4dh3xxPBHfH5g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvrYrk7X6Ob4IAAB5z0zRKuV3u3jjylTd3sxJi3IjizAIhAJamPM5boqAUO4cKKp1GKYh4FArfiWDSkfximdbkngf0"}]}}},"readme":"# Path-to-URL\n\n[![npm](http://img.shields.io/npm/v/path-to-url.svg?style=flat)](https://www.npmjs.org/package/path-to-url)\n[![Travis](http://img.shields.io/travis/brentburgoyne/path-to-url.svg?style=flat)](https://travis-ci.org/brentburgoyne/path-to-url)\n[![Code Climate](http://img.shields.io/codeclimate/github/brentburgoyne/path-to-url.svg?style=flat)](https://codeclimate.com/github/brentburgoyne/path-to-url)\n[![Code Climate Coverage](http://img.shields.io/codeclimate/coverage/github/brentburgoyne/path-to-url.svg?style=flat)](https://codeclimate.com/github/brentburgoyne/path-to-url)\n[![Gemnasium](http://img.shields.io/gemnasium/brentburgoyne/path-to-url.svg?style=flat)](https://gemnasium.com/brentburgoyne/path-to-url)\n\nTurns an [Express-style path][1] string such as `/user/:name` into a URL like\n`/user/brentburgoyne` to support reverse routing.\n\n## Installation\n\n```bash\n$ npm install path-to-url --save\n```\n\n## Usage\n\n```js\nvar pathToUrl = require('path-to-url');\n\n// pathToUrl(path, params)\n```\n\n- **path** A string in the express path format.\n- **params** An object where the keys match named params in the path to be\nreplaced with the value.\n    - **params.param** The value that will replace `:param` in the\n    URL.\n    - **params.$** Special key where the value replaces the `*` wildcard in\n    greedy paths.\n\n### Simple\n\n```js\npathToUrl('/user/:name', { name: 'brentburgoyne' });\n// => \"/user/brentburgoyne\"\n```\n\n### Optional params\n\n```js\npathToUrl('/results/:page?', {});\n// => \"/results\"\n\npathToUrl('/results/:page?', { page: 47 });\n// => \"/results/47\"\n```\n\n### Suffixes\n\n```js\npathToUrl('/results.:format?', {});\n// => \"/results\"\n\npathToUrl('/results.:format?', { format: 'json' });\n// => \"/results.json\"\n```\n\n### Wildcard\n\n```js\npathToUrl('/results*', {});\n// => \"/results\"\n\npathToUrl('/results*', { $: '/anthing/goes/here' });\n// => \"/results/anything/goes/here\"\n```\n\n## Disclaimer\n\nWhile the most common use cases are covered, this module is not currently able\nto support every path supported by Express. Some of the things tat are not\nsupported include optional groups and custom regular expressions.\n\n[1]: https://github.com/component/path-to-regexp#readme\n","maintainers":[{"name":"brentburgoyne","email":"brent47@gmail.com"}],"time":{"modified":"2022-06-23T14:44:13.744Z","created":"2014-05-15T12:56:57.405Z","0.0.1":"2014-05-15T12:56:57.405Z","0.1.0":"2014-05-20T12:48:48.068Z"},"homepage":"https://github.com/brentburgoyne/path-to-url","keywords":["Express","Route","Routing","Router","Reverse","URL","path","params"],"repository":{"type":"git","url":"git://github.com/brentburgoyne/path-to-url.git"},"author":{"name":"Brent Burgoyne"},"bugs":{"url":"https://github.com/brentburgoyne/path-to-url/issues"},"license":"MIT","readmeFilename":"README.md","users":{"mpinteractiv":true}}