{"_id":"@depup/path-to-regexp","_rev":"3-a9429724de0a8e359f909c72569b3b42","name":"@depup/path-to-regexp","dist-tags":{"latest":"8.4.2-depup.0"},"versions":{"8.4.0-depup.0":{"name":"@depup/path-to-regexp","version":"8.4.0-depup.0","keywords":["path-to-regexp","depup","updated-dependencies","security","latest","patched","express","regexp","route","routing"],"license":"MIT","_id":"@depup/path-to-regexp@8.4.0-depup.0","maintainers":[{"name":"chiefmikey","email":"wolfemikl@gmail.com"}],"homepage":"https://github.com/pillarjs/path-to-regexp#readme","bugs":{"url":"https://github.com/pillarjs/path-to-regexp/issues"},"dist":{"shasum":"678d987b3abb571b6603a5bbd1e22a2472aeffe7","tarball":"https://registry.npmjs.org/@depup/path-to-regexp/-/path-to-regexp-8.4.0-depup.0.tgz","fileCount":8,"integrity":"sha512-GHPAaZ4xiaQO7yxoJGRWs50It0KYIlCk8zcOvUV8nYTBbmftcCgB30i4Q5tbr3npqWPyfzGMJZZpDQJWWrPAAA==","signatures":[{"sig":"MEUCIQCw8k5a7q7SGXEGnFWSaKq7tfSD/S9+6c3RMrobQ7IaPAIgV9faZgRzutcf/+pBac/LPEcmXeQmzUuRtgTupfpF40I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64070},"main":"dist/index.js","depup":{"changes":{},"smokeTest":"passed","depsUpdated":0,"processedAt":"2026-03-26T20:15:02.983Z","originalPackage":"path-to-regexp","originalVersion":"8.4.0"},"exports":"./dist/index.js","funding":{"url":"https://opencollective.com/express","type":"opencollective"},"gitHead":"660bb1e65de18f3dac24283b271a74a35efe7f66","scripts":{"lint":"ts-scripts lint","size":"size-limit","test":"ts-scripts test && npm run size","bench":"vitest bench","build":"ts-scripts build","specs":"ts-scripts specs","format":"ts-scripts format"},"typings":"dist/index.d.ts","_npmUser":{"name":"chiefmikey","email":"wolfemikl@gmail.com"},"repository":{"url":"git+https://github.com/pillarjs/path-to-regexp.git","type":"git"},"size-limit":[{"path":"dist/index.js","limit":"2.15 kB"}],"ts-scripts":{"dist":["dist"],"project":["tsconfig.build.json"]},"_npmVersion":"11.9.0","description":"Express style path to RegExp utility (with updated dependencies)","directories":{},"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.5","recheck":"^4.5.0","size-limit":"^11.1.2","typescript":"^5.7.3","@types/node":"^22.7.2","@types/semver":"^7.3.1","@vitest/coverage-v8":"^3.0.5","@borderless/ts-scripts":"^0.15.0","@size-limit/preset-small-lib":"^11.1.2"},"_npmOperationalInternal":{"tmp":"tmp/path-to-regexp_8.4.0-depup.0_1774556104922_0.3727710808185658","host":"s3://npm-registry-packages-npm-production"}},"8.4.1-depup.0":{"name":"@depup/path-to-regexp","version":"8.4.1-depup.0","keywords":["path-to-regexp","depup","updated-dependencies","security","latest","patched","express","regexp","route","routing"],"license":"MIT","_id":"@depup/path-to-regexp@8.4.1-depup.0","maintainers":[{"name":"chiefmikey","email":"wolfemikl@gmail.com"}],"homepage":"https://github.com/pillarjs/path-to-regexp#readme","bugs":{"url":"https://github.com/pillarjs/path-to-regexp/issues"},"dist":{"shasum":"a56b101cdaa6566063036dd8a963c8ef121ede64","tarball":"https://registry.npmjs.org/@depup/path-to-regexp/-/path-to-regexp-8.4.1-depup.0.tgz","fileCount":8,"integrity":"sha512-IXIX9Vspf8GF8EN5AymzMCkkUJPgBW9e+dwI0uMyc8OXemytB4OG+pwWAg60JMU1ogkrYxhDM8Kc5c+t8X78Xg==","signatures":[{"sig":"MEYCIQCgMNPg7KRegqqPjZKDr1Kb2bi1Jm2KxEI0/MmyjTr6AgIhAK29xcaAwcblD7WGFZP2Ik+8RcyffifAPlduxjaV8/Cg","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":61013},"main":"dist/index.js","depup":{"changes":{},"smokeTest":"passed","depsUpdated":0,"processedAt":"2026-03-31T00:38:37.848Z","originalPackage":"path-to-regexp","originalVersion":"8.4.1"},"exports":"./dist/index.js","funding":{"url":"https://opencollective.com/express","type":"opencollective"},"gitHead":"4db30eda224a7f1e8277c560e0bce82ab5e54b59","scripts":{"lint":"ts-scripts lint","size":"size-limit","test":"ts-scripts test && npm run size","bench":"vitest bench","build":"ts-scripts build","specs":"ts-scripts specs","format":"ts-scripts format"},"typings":"dist/index.d.ts","_npmUser":{"name":"chiefmikey","email":"wolfemikl@gmail.com"},"repository":{"url":"git+https://github.com/pillarjs/path-to-regexp.git","type":"git"},"size-limit":[{"path":"dist/index.js","limit":"2 kB"}],"ts-scripts":{"dist":["dist"],"project":["tsconfig.build.json"]},"_npmVersion":"11.9.0","description":"Express style path to RegExp utility (with updated dependencies)","directories":{},"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.5","recheck":"^4.5.0","size-limit":"^11.1.2","typescript":"^5.7.3","@types/node":"^22.7.2","@types/semver":"^7.3.1","@vitest/coverage-v8":"^3.0.5","@borderless/ts-scripts":"^0.15.0","@size-limit/preset-small-lib":"^11.1.2"},"_npmOperationalInternal":{"tmp":"tmp/path-to-regexp_8.4.1-depup.0_1774917519920_0.44922446973611296","host":"s3://npm-registry-packages-npm-production"}},"8.4.2-depup.0":{"name":"@depup/path-to-regexp","version":"8.4.2-depup.0","description":"Express style path to RegExp utility (with updated dependencies)","keywords":["path-to-regexp","depup","updated-dependencies","security","latest","patched","express","regexp","route","routing"],"repository":{"type":"git","url":"git+https://github.com/pillarjs/path-to-regexp.git"},"funding":{"type":"opencollective","url":"https://opencollective.com/express"},"license":"MIT","exports":"./dist/index.js","main":"dist/index.js","typings":"dist/index.d.ts","scripts":{"bench":"vitest bench","build":"ts-scripts build","format":"ts-scripts format","lint":"ts-scripts lint","size":"size-limit","specs":"ts-scripts specs","test":"ts-scripts test && npm run size"},"devDependencies":{"@borderless/ts-scripts":"^0.15.0","@size-limit/preset-small-lib":"^11.1.2","@types/node":"^22.7.2","@types/semver":"^7.3.1","@vitest/coverage-v8":"^3.0.5","recheck":"^4.5.0","size-limit":"^11.1.2","typescript":"^5.7.3","vitest":"^3.0.5"},"size-limit":[{"path":"dist/index.js","limit":"2 kB"}],"ts-scripts":{"dist":["dist"],"project":["tsconfig.build.json"]},"depup":{"changes":{},"depsUpdated":0,"originalPackage":"path-to-regexp","originalVersion":"8.4.2","processedAt":"2026-04-02T00:37:50.726Z","smokeTest":"passed"},"gitHead":"144b8037cc54651f7742af545c7b2ec42ba42b15","_id":"@depup/path-to-regexp@8.4.2-depup.0","bugs":{"url":"https://github.com/pillarjs/path-to-regexp/issues"},"homepage":"https://github.com/pillarjs/path-to-regexp#readme","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-xNIW6+YLXZ7DbDTn7pm/p21f+HV/PN991dKAGkHD6pDNiRem8s7EoyT+8WvVuzxliKk3r/ECamjf5MoJYlYZMQ==","shasum":"8e737ca205410d8fe8f142e79bae43fde67713a9","tarball":"https://registry.npmjs.org/@depup/path-to-regexp/-/path-to-regexp-8.4.2-depup.0.tgz","fileCount":8,"unpackedSize":60684,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDKdNz0kjdqAbilcwK/JV8L64tfSyGuctBL3WXKIDvQwgIga6Vmj+DRX5nFU57GF14wR4oUX1Ar1ooYSqF2KBlN2IA="}]},"_npmUser":{"name":"chiefmikey","email":"wolfemikl@gmail.com"},"directories":{},"maintainers":[{"name":"chiefmikey","email":"wolfemikl@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/path-to-regexp_8.4.2-depup.0_1775090272235_0.712735157771549"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-26T20:15:04.852Z","modified":"2026-04-02T00:37:52.513Z","8.4.0-depup.0":"2026-03-26T20:15:05.062Z","8.4.1-depup.0":"2026-03-31T00:38:40.083Z","8.4.2-depup.0":"2026-04-02T00:37:52.379Z"},"bugs":{"url":"https://github.com/pillarjs/path-to-regexp/issues"},"license":"MIT","homepage":"https://github.com/pillarjs/path-to-regexp#readme","keywords":["path-to-regexp","depup","updated-dependencies","security","latest","patched","express","regexp","route","routing"],"repository":{"type":"git","url":"git+https://github.com/pillarjs/path-to-regexp.git"},"description":"Express style path to RegExp utility (with updated dependencies)","maintainers":[{"name":"chiefmikey","email":"wolfemikl@gmail.com"}],"readme":"# Path-to-RegExp\n\n> Turn a path string such as `/user/:name` into a regular expression.\n\n[![NPM version][npm-image]][npm-url]\n[![NPM downloads][downloads-image]][downloads-url]\n[![Build status][build-image]][build-url]\n[![Build coverage][coverage-image]][coverage-url]\n[![License][license-image]][license-url]\n\n## Installation\n\n```\nnpm install path-to-regexp --save\n```\n\n## Usage\n\n```js\nconst {\n  match,\n  pathToRegexp,\n  compile,\n  parse,\n  stringify,\n} = require(\"path-to-regexp\");\n```\n\n### Parameters\n\nParameters match arbitrary strings in a path by matching up to the end of the segment, or up to any proceeding tokens. They are defined by prefixing a colon to the parameter name (`:foo`). Parameter names can use any valid JavaScript identifier, or be double quoted to use other characters (`:\"param-name\"`).\n\n```js\nconst fn = match(\"/:foo/:bar\");\n\nfn(\"/test/route\");\n//=> { path: '/test/route', params: { foo: 'test', bar: 'route' } }\n```\n\n### Wildcard\n\nWildcard parameters match one or more characters across multiple segments. They are defined the same way as regular parameters, but are prefixed with an asterisk (`*foo`).\n\n```js\nconst fn = match(\"/*splat\");\n\nfn(\"/bar/baz\");\n//=> { path: '/bar/baz', params: { splat: [ 'bar', 'baz' ] } }\n```\n\n### Optional\n\nBraces can be used to define parts of the path that are optional.\n\n```js\nconst fn = match(\"/users{/:id}/delete\");\n\nfn(\"/users/delete\");\n//=> { path: '/users/delete', params: {} }\n\nfn(\"/users/123/delete\");\n//=> { path: '/users/123/delete', params: { id: '123' } }\n```\n\n## Match\n\nThe `match` function returns a function for matching strings against a path:\n\n- **path** String, `TokenData` object, or array of strings and `TokenData` objects.\n- **options** _(optional)_ (Extends [pathToRegexp](#pathToRegexp) options)\n  - **decode** Function for decoding strings to params, or `false` to disable all processing. (default: `decodeURIComponent`)\n\n```js\nconst fn = match(\"/foo/:bar\");\n```\n\n**Please note:** `path-to-regexp` is intended for ordered data (e.g. paths, hosts). It can not handle arbitrarily ordered data (e.g. query strings, URL fragments, JSON, etc).\n\n## PathToRegexp\n\nThe `pathToRegexp` function returns the `regexp` for matching strings against paths, and an array of `keys` for understanding the `RegExp#exec` matches.\n\n- **path** String, `TokenData` object, or array of strings and `TokenData` objects.\n- **options** _(optional)_ (See [parse](#parse) for more options)\n  - **sensitive** Regexp will be case sensitive. (default: `false`)\n  - **end** Validate the match reaches the end of the string. (default: `true`)\n  - **delimiter** The default delimiter for segments, e.g. `[^/]` for `:named` parameters. (default: `'/'`)\n  - **trailing** Allows optional trailing delimiter to match. (default: `true`)\n\n```js\nconst { regexp, keys } = pathToRegexp(\"/foo/:bar\");\n\nregexp.exec(\"/foo/123\"); //=> [\"/foo/123\", \"123\"]\n```\n\n## Compile (\"Reverse\" Path-To-RegExp)\n\nThe `compile` function will return a function for transforming parameters into a valid path:\n\n- **path** A string or `TokenData` object.\n- **options** (See [parse](#parse) for more options)\n  - **delimiter** The default delimiter for segments, e.g. `[^/]` for `:named` parameters. (default: `'/'`)\n  - **encode** Function for encoding input strings for output into the path, or `false` to disable entirely. (default: `encodeURIComponent`)\n\n```js\nconst toPath = compile(\"/user/:id\");\n\ntoPath({ id: \"name\" }); //=> \"/user/name\"\ntoPath({ id: \"café\" }); //=> \"/user/caf%C3%A9\"\n\nconst toPathRepeated = compile(\"/*segment\");\n\ntoPathRepeated({ segment: [\"foo\"] }); //=> \"/foo\"\ntoPathRepeated({ segment: [\"a\", \"b\", \"c\"] }); //=> \"/a/b/c\"\n\n// When disabling `encode`, you need to make sure inputs are encoded correctly. No arrays are accepted.\nconst toPathRaw = compile(\"/user/:id\", { encode: false });\n\ntoPathRaw({ id: \"%3A%2F\" }); //=> \"/user/%3A%2F\"\n```\n\n## Stringify\n\nTransform a `TokenData` object to a Path-to-RegExp string.\n\n- **data** A `TokenData` object.\n\n```js\nconst data = {\n  tokens: [\n    { type: \"text\", value: \"/\" },\n    { type: \"param\", name: \"foo\" },\n  ],\n};\n\nconst path = stringify(data); //=> \"/:foo\"\n```\n\n## Developers\n\n- If you are rewriting paths with match and compile, consider using `encode: false` and `decode: false` to keep raw paths passed around.\n- To ensure matches work on paths containing characters usually encoded, such as emoji, consider using [encodeurl](https://github.com/pillarjs/encodeurl) for `encodePath`.\n\n### Parse\n\nThe `parse` function accepts a string and returns `TokenData`, which can be used with `match` and `compile`.\n\n- **path** A string.\n- **options** _(optional)_\n  - **encodePath** A function for encoding input strings. (default: `x => x`, recommended: [`encodeurl`](https://github.com/pillarjs/encodeurl))\n\n### Tokens\n\n`TokenData` has two properties:\n\n- **tokens** A sequence of tokens, currently of types `text`, `param`, `wildcard`, or `group`.\n- **originalPath** The original path used with `parse`, shown in error messages to assist debugging.\n\n### Custom path\n\nIn some applications you may not be able to use the `path-to-regexp` syntax, but you still want to use this library for `match` and `compile`. For example:\n\n```js\nimport { match } from \"path-to-regexp\";\n\nconst tokens = [\n  { type: \"text\", value: \"/\" },\n  { type: \"param\", name: \"foo\" },\n];\nconst originalPath = \"/[foo]\"; // To help debug error messages.\nconst path = { tokens, originalPath };\nconst fn = match(path);\n\nfn(\"/test\"); //=> { path: '/test', params: { foo: 'test' } }\n```\n\n## Errors\n\nAn effort has been made to ensure ambiguous paths from previous releases throw an error. This means you might be seeing an error when things worked before.\n\n### Missing parameter name\n\nParameter names must be provided after `:` or `*`, for example `/*path`. They can be valid JavaScript identifiers (e.g. `:myName`) or JSON strings (`:\"my-name\"`).\n\n### Unexpected `?` or `+`\n\nIn past releases, `?`, `*`, and `+` were used to denote optional or repeating parameters. As an alternative, try these:\n\n- For optional (`?`), use braces: `/file{.:ext}`.\n- For one or more (`+`), use a wildcard: `/*path`.\n- For zero or more (`*`), use both: `/files{/*path}`.\n\n### Unexpected `(`, `)`, `[`, `]`, etc.\n\nPrevious versions of Path-to-RegExp used these for RegExp features. This version no longer supports them so they've been reserved to avoid ambiguity. To match these characters literally, escape them with a backslash, e.g. `\"\\\\(\"`.\n\n### Unterminated quote\n\nParameter names can be wrapped in double quote characters, and this error means you forgot to close the quote character. For example, `:\"foo`.\n\n### Express <= 4.x\n\nPath-To-RegExp breaks compatibility with Express <= `4.x` in the following ways:\n\n- The wildcard `*` must have a name and matches the behavior of parameters `:`.\n- The optional character `?` is no longer supported, use braces instead: `/:file{.:ext}`.\n- Regexp characters are not supported.\n- Some characters have been reserved to avoid confusion during upgrade (`()[]?+!`).\n- Parameter names now support valid JavaScript identifiers, or quoted like `:\"this\"`.\n\n## License\n\nMIT\n\n[npm-image]: https://img.shields.io/npm/v/path-to-regexp\n[npm-url]: https://npmjs.org/package/path-to-regexp\n[downloads-image]: https://img.shields.io/npm/dm/path-to-regexp\n[downloads-url]: https://npmjs.org/package/path-to-regexp\n[build-image]: https://img.shields.io/github/actions/workflow/status/pillarjs/path-to-regexp/ci.yml?branch=master\n[build-url]: https://github.com/pillarjs/path-to-regexp/actions/workflows/ci.yml?query=branch%3Amaster\n[coverage-image]: https://img.shields.io/codecov/c/gh/pillarjs/path-to-regexp\n[coverage-url]: https://codecov.io/gh/pillarjs/path-to-regexp\n[license-image]: http://img.shields.io/npm/l/path-to-regexp.svg?style=flat\n[license-url]: LICENSE.md\n","readmeFilename":"Readme.md"}