{"_id":"@alloc/path-types","_rev":"2-0520d0628280b5ea7c088cf2a0985407","name":"@alloc/path-types","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@alloc/path-types","version":"0.1.0","license":"MIT","_id":"@alloc/path-types@0.1.0","maintainers":[{"name":"aleclarson","email":"alec.stanford.larson@gmail.com"}],"dist":{"shasum":"37fbe46af826da8d33f468c8594c349249acf250","tarball":"https://registry.npmjs.org/@alloc/path-types/-/path-types-0.1.0.tgz","fileCount":4,"integrity":"sha512-rhtXp/PqkfKRVwG+Bz/ew9xYr9IAcNB3OJx7aEjZqXeXiDTcYbAcrecub444O1RkWnhV/Z8yF+HVL7lRT5IwxA==","signatures":[{"sig":"MEUCIQDlchV6z3E0hnc9KBeLz9UH0AS304BR3ewHxRQ+o7R/6AIgfSBzPiyNlLOJ7jLVMbqQMaZoZoOxxaZxQYqTUqPPQHY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2868},"_from":"file:alloc-path-types-0.1.0.tgz","types":"./index.d.ts","_npmUser":{"name":"aleclarson","email":"alec.stanford.larson@gmail.com"},"_resolved":"/private/var/folders/9p/k7vwjbvj5qz6xbp6hn52mk540000gn/T/b2625aa24f7b04a867a21b3589607b10/alloc-path-types-0.1.0.tgz","_integrity":"sha512-rhtXp/PqkfKRVwG+Bz/ew9xYr9IAcNB3OJx7aEjZqXeXiDTcYbAcrecub444O1RkWnhV/Z8yF+HVL7lRT5IwxA==","_npmVersion":"10.5.1","description":"A simple package for type-level manipulation of route paths (i.e. `/foo/:bar`)","directories":{},"_nodeVersion":"22.0.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/path-types_0.1.0_1715456630922_0.1718953022896068","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"@alloc/path-types","version":"0.1.1","keywords":["url","path","pathname","typescript","infer","parameters","params"],"author":{"name":"Alec Larson"},"license":"MIT","_id":"@alloc/path-types@0.1.1","maintainers":[{"name":"aleclarson","email":"alec.stanford.larson@gmail.com"}],"homepage":"https://github.com/alloc/path-types#readme","bugs":{"url":"https://github.com/alloc/path-types/issues"},"dist":{"shasum":"1aa3e9c9b27d12ac96c390ae70f10aefa3ada347","tarball":"https://registry.npmjs.org/@alloc/path-types/-/path-types-0.1.1.tgz","fileCount":4,"integrity":"sha512-/sl2Z9N5rjs9DrOoMMlYPqdBPYaote5auguQbfJ2iSshPGTD+2C4ar9r9WTbuR4N66VD34lSy17IyRQMhvqJZw==","signatures":[{"sig":"MEQCIA5rmpJ71IGV22ASvtDGtpdmMNlW1g0LSsSq3FO3geFlAiAlagYqSra7OJplzlcgjXFqoeILjn1TrWJYiIv08LaErQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3172},"types":"./index.d.ts","gitHead":"7602742c84f3e87c7005c03cf1da739bf5fc0ef2","_npmUser":{"name":"aleclarson","email":"alec.stanford.larson@gmail.com"},"repository":{"url":"git+https://github.com/alloc/path-types.git","type":"git"},"_npmVersion":"10.8.3","description":"TypeScript utility types for URL pathnames","directories":{},"_nodeVersion":"22.9.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/path-types_0.1.1_1728055013786_0.223581258080495","host":"s3://npm-registry-packages"}},"0.1.2":{"name":"@alloc/path-types","version":"0.1.2","description":"TypeScript utility types for URL pathnames","license":"MIT","keywords":["url","path","pathname","typescript","infer","parameters","params"],"author":{"name":"Alec Larson"},"repository":{"type":"git","url":"git+https://github.com/alloc/path-types.git"},"_id":"@alloc/path-types@0.1.2","gitHead":"45a5d716ecc7f24fbe1ae28bb95022caa6cefcb5","types":"./index.d.ts","bugs":{"url":"https://github.com/alloc/path-types/issues"},"homepage":"https://github.com/alloc/path-types#readme","_nodeVersion":"22.3.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-p+eZytuRXAcd4jI+fsJjtED/vadSLRfbx5bejIOifCboUgvXR26dIy9WMhw6WQEqH8FO1hXG2q995cfWWuf++w==","shasum":"b26b0a1e3bf5c09f913b68ee69a3e3a2785ec5aa","tarball":"https://registry.npmjs.org/@alloc/path-types/-/path-types-0.1.2.tgz","fileCount":4,"unpackedSize":3222,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEwX3acxdI4OoYixDyvrysyiktgZCW/K+oMFvJBgKk7+AiEA84J0q9Lw3zv5HyggqOvAbXS6/aXkiifZsWuc92VP1xA="}]},"_npmUser":{"name":"aleclarson","email":"alec.stanford.larson@gmail.com"},"directories":{},"maintainers":[{"name":"aleclarson","email":"alec.stanford.larson@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/path-types_0.1.2_1728497160587_0.6258701200744798"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-11T19:43:50.798Z","modified":"2024-10-09T18:06:00.978Z","0.1.0":"2024-05-11T19:43:51.704Z","0.1.1":"2024-10-04T15:16:53.928Z","0.1.2":"2024-10-09T18:06:00.756Z"},"bugs":{"url":"https://github.com/alloc/path-types/issues"},"author":{"name":"Alec Larson"},"license":"MIT","homepage":"https://github.com/alloc/path-types#readme","keywords":["url","path","pathname","typescript","infer","parameters","params"],"repository":{"type":"git","url":"git+https://github.com/alloc/path-types.git"},"description":"TypeScript utility types for URL pathnames","maintainers":[{"name":"aleclarson","email":"alec.stanford.larson@gmail.com"}],"readme":"# @alloc/path-types\n\nA simple package for type-level manipulation of route paths (i.e. `/foo/:bar`)\n\n## Usage\n\nThe two types included are `InferParams` and `PathTemplate`.\n\nThe `InferParams` type expects a route path string literal. It tells the type checker how to parse route paths in order to extract “route parameter names” (the `:bar` part in `/foo/:bar`) from them. It returns an object type whose keys are the route parameters. By default, the property values are a `string` type, but this can be customized with the 2nd type parameter.\n\n```ts\ntype Params = InferParams<'/foo/:bar'>\n// => { bar: string }\n```\n\nThe `PathTemplate` type also expects a route path string literal. It returns a template string type where the route parameters are replaced with `${string}`, so the type is useful for pathname construction.\n\n```ts\ntype Pathname = PathTemplate<'/foo/:bar'>\n// => `/foo/${string}`\n```\n","readmeFilename":"README.md"}