{"_id":"@anymud/url","_rev":"6-2dacdb0c10c441945156b25c4fc1b4d2","name":"@anymud/url","dist-tags":{"latest":"0.2.5"},"versions":{"0.1.4":{"name":"@anymud/url","author":{"name":"Kyle Tse","email":"shtse8@gmail.com"},"version":"0.1.4","scripts":{"test":"bun test","build":"bun build.ts","release":"release-it"},"description":"A comprehensive URL manipulation library, offering easy subdomain, path, host adjustments, and search parameters merging.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/anymud/uri.git"},"private":false,"sideEffects":false,"exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","type":"module","dependencies":{},"devDependencies":{"@anymud/bun-plugin-dts":"^1.0.2","@anymud/utils":"^0.0.2","@types/bun":"latest","release-it":"^17.1.1","typedoc":"^0.25.9"},"peerDependencies":{"typescript":"^5.0.0"},"keywords":["URI","Uniform Resource Identifier","URL","Parsing","Resolution","JavaScript","Library","Package","npm","yarn","ES modules","Module","Lightweight","Efficient","Utility","Syntax","Usage","Examples","API","Functions","Components","String","Parsing","Resolving","JavaScript","TypeScript","Open Source","MIT License"],"_id":"@anymud/url@0.1.4","gitHead":"2faf5b2b6fd1e963bd5047658c315c69aa03a732","bugs":{"url":"https://github.com/anymud/uri/issues"},"homepage":"https://github.com/anymud/uri#readme","_nodeVersion":"21.6.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-ux0fWGk4zq/UwmkUEJSozEo/XLFKM+XjQcHO4jkEZxlaxdnjDq+JGzwVHDkcsHXxI/ciAxXyL01qVOMt8bbnfQ==","shasum":"e945f0c5bcc96d7f455d9f7cac9e35b5d37187f9","tarball":"https://registry.npmjs.org/@anymud/url/-/url-0.1.4.tgz","fileCount":4,"unpackedSize":9789,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWuLYcixe6PnuXMfKECVA1ui4DCPjYCqYwkGNr6AGlHAIgJVT1VEp6PDR0wUBpPfviNCPhUtVL/rcTkqlENz4fS8A="}]},"_npmUser":{"name":"shtse8","email":"shtse8@gmail.com"},"directories":{},"maintainers":[{"name":"shtse8","email":"shtse8@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/url_0.1.4_1708974264733_0.4374643863409724"},"_hasShrinkwrap":false},"0.2.0":{"name":"@anymud/url","author":{"name":"Kyle Tse","email":"shtse8@gmail.com"},"version":"0.2.0","scripts":{"test":"bun test","build":"bun build.ts","release":"release-it"},"description":"A comprehensive URL manipulation library, offering easy subdomain, path, host adjustments, and search parameters merging.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/anymud/uri.git"},"private":false,"sideEffects":false,"exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","type":"module","dependencies":{},"devDependencies":{"@anymud/bun-plugin-dts":"^1.0.2","@anymud/utils":"^0.0.2","@types/bun":"latest","release-it":"^17.1.1","typedoc":"^0.25.9"},"peerDependencies":{"typescript":"^5.0.0"},"keywords":["URI","Uniform Resource Identifier","URL","Parsing","Resolution","JavaScript","Library","Package","npm","yarn","ES modules","Module","Lightweight","Efficient","Utility","Syntax","Usage","Examples","API","Functions","Components","String","Parsing","Resolving","JavaScript","TypeScript","Open Source","MIT License"],"_id":"@anymud/url@0.2.0","gitHead":"9c512d270e7d36ffa70ea1096d6d93f80e2e241b","bugs":{"url":"https://github.com/anymud/uri/issues"},"homepage":"https://github.com/anymud/uri#readme","_nodeVersion":"21.6.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-dOZzK/wez+0fk0N4eoLQem9fSQgwi2lwnU6j/mbH5OUfULhS6ea/+Td2iy7deEv79LAXvEuWUwGFgtpprNy4Qw==","shasum":"b2aef80616c93dfe064ecb8b8382bf4e4e0d6cee","tarball":"https://registry.npmjs.org/@anymud/url/-/url-0.2.0.tgz","fileCount":4,"unpackedSize":11019,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID/HpBqs54v0gTQwPeitevwxaICBD0hcCIFBgM/9HG7mAiArehE0WkPPQrj5mgvvtxw+x2ukYrtmDk86vTc/AUIiBg=="}]},"_npmUser":{"name":"shtse8","email":"shtse8@gmail.com"},"directories":{},"maintainers":[{"name":"shtse8","email":"shtse8@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/url_0.2.0_1708975824725_0.21990049653618104"},"_hasShrinkwrap":false},"0.2.1":{"name":"@anymud/url","author":{"name":"Kyle Tse","email":"shtse8@gmail.com"},"version":"0.2.1","scripts":{"test":"bun test","build":"bun build.ts","release":"release-it"},"description":"A comprehensive URL manipulation library, offering easy subdomain, path, host adjustments, and search parameters merging.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/anymud/uri.git"},"private":false,"sideEffects":false,"exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","type":"module","dependencies":{},"devDependencies":{"@anymud/bun-plugin-dts":"^1.0.2","@anymud/utils":"^0.0.2","@types/bun":"latest","release-it":"^17.1.1","typedoc":"^0.25.9"},"peerDependencies":{"typescript":"^5.0.0"},"keywords":["URI","Uniform Resource Identifier","URL","Parsing","Resolution","JavaScript","Library","Package","npm","yarn","ES modules","Module","Lightweight","Efficient","Utility","Syntax","Usage","Examples","API","Functions","Components","String","Parsing","Resolving","JavaScript","TypeScript","Open Source","MIT License"],"_id":"@anymud/url@0.2.1","gitHead":"62f9fade1455cb8d49f2f27b2c45fa4a0fef3d14","bugs":{"url":"https://github.com/anymud/uri/issues"},"homepage":"https://github.com/anymud/uri#readme","_nodeVersion":"21.6.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-sNUQGTfPrMwVQe3yQzDBw5lTA84EvL9RIycYnUIXzHHukRZ0kQ06vKf2y/djKRHsX+E8YhBD579PUCtVrnHlCQ==","shasum":"998454fd2f47d5c9b32bccc94c5a4e48ded8703f","tarball":"https://registry.npmjs.org/@anymud/url/-/url-0.2.1.tgz","fileCount":4,"unpackedSize":11019,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0Vlg1zXH/jFD4QkJK33kpjliWOJ9Avi0efZ/uxaOxswIhAKA1UVBXnXViZzwANknTYludTtA2i9jOH7VEpaex5wPT"}]},"_npmUser":{"name":"shtse8","email":"shtse8@gmail.com"},"directories":{},"maintainers":[{"name":"shtse8","email":"shtse8@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/url_0.2.1_1708975981164_0.8027850804641699"},"_hasShrinkwrap":false},"0.2.2":{"name":"@anymud/url","author":{"name":"Kyle Tse","email":"shtse8@gmail.com"},"version":"0.2.2","scripts":{"test":"bun test","build":"bun build.ts","release":"bun run test & bun run build & release-it"},"description":"A comprehensive URL manipulation library, offering easy subdomain, path, host adjustments, and search parameters merging.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/anymud/uri.git"},"private":false,"sideEffects":false,"exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","type":"module","dependencies":{},"devDependencies":{"@anymud/bun-plugin-dts":"^1.0.2","@anymud/utils":"^0.0.2","@types/bun":"latest","release-it":"^17.1.1","typedoc":"^0.25.9"},"peerDependencies":{"typescript":"^5.0.0"},"keywords":["URI","Uniform Resource Identifier","URL","Parsing","Resolution","JavaScript","Library","Package","npm","yarn","ES modules","Module","Lightweight","Efficient","Utility","Syntax","Usage","Examples","API","Functions","Components","String","Parsing","Resolving","JavaScript","TypeScript","Open Source","MIT License"],"_id":"@anymud/url@0.2.2","gitHead":"f800eaf0d126554ef9d98b3e2f90c28d29ea7fee","bugs":{"url":"https://github.com/anymud/uri/issues"},"homepage":"https://github.com/anymud/uri#readme","_nodeVersion":"21.6.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-aLjBkUxUbV+Ds3NLiHl6KFVE3Mg6IzJa9aJ/9YfnlB6MwNXhyAp/25bkTh1TMY+GcAGK48KBnfCuLJgZHgeAKQ==","shasum":"6f123a3938e15b59c829ba3cc131e7a428748953","tarball":"https://registry.npmjs.org/@anymud/url/-/url-0.2.2.tgz","fileCount":4,"unpackedSize":11218,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBgRIclPRHP8eAgNeNKNKCxmNM681JLiw5B6t8HcLsKuAiBJaOqbO6G+S69ktFFYyc1QFOLrfvi3PlRmdK2MCwbzEw=="}]},"_npmUser":{"name":"shtse8","email":"shtse8@gmail.com"},"directories":{},"maintainers":[{"name":"shtse8","email":"shtse8@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/url_0.2.2_1708976102531_0.16555147348269217"},"_hasShrinkwrap":false},"0.2.3":{"name":"@anymud/url","author":{"name":"Kyle Tse","email":"shtse8@gmail.com"},"version":"0.2.3","scripts":{"test":"bun test","build":"bun build.ts","release":"bun run test & bun run build & release-it"},"description":"A comprehensive URL manipulation library, offering easy subdomain, path, host adjustments, and search parameters merging.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/anymud/uri.git"},"private":false,"sideEffects":false,"exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","type":"module","dependencies":{},"devDependencies":{"@anymud/bun-plugin-dts":"^1.0.2","@anymud/utils":"^0.0.2","@types/bun":"latest","release-it":"^17.1.1","typedoc":"^0.25.9"},"peerDependencies":{"typescript":"^5.0.0"},"keywords":["URI","Uniform Resource Identifier","URL","Parsing","Resolution","JavaScript","Library","Package","npm","yarn","ES modules","Module","Lightweight","Efficient","Utility","Syntax","Usage","Examples","API","Functions","Components","String","Parsing","Resolving","JavaScript","TypeScript","Open Source","MIT License"],"_id":"@anymud/url@0.2.3","gitHead":"96505e035b6da2c10f387e0edeafa9a74ca082d2","bugs":{"url":"https://github.com/anymud/uri/issues"},"homepage":"https://github.com/anymud/uri#readme","_nodeVersion":"21.6.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-WYbAmdshjETao2GbDbSgIStNyRJ7ACNH2M6V9bhysFA+O2Bgu9afKgxytk9VBrSKZ+jlUPwmup9hN8XG12TfLg==","shasum":"00c7d595be3fe8afbff07ceb5b1dcf2ea1f60366","tarball":"https://registry.npmjs.org/@anymud/url/-/url-0.2.3.tgz","fileCount":4,"unpackedSize":11230,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBjSdXWJ20tlWQ10vWCZ08t0NZpjw1zsMcmdjgtiMBDuAiEA6JZ+pYehXr64GcE3T9uKzhTAgQ0SMyScqXMl4N2CfgQ="}]},"_npmUser":{"name":"shtse8","email":"shtse8@gmail.com"},"directories":{},"maintainers":[{"name":"shtse8","email":"shtse8@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/url_0.2.3_1708976545167_0.32806051735318786"},"_hasShrinkwrap":false},"0.2.4":{"name":"@anymud/url","author":{"name":"Kyle Tse","email":"shtse8@gmail.com"},"version":"0.2.4","scripts":{"test":"bun test","build":"bun build.ts","release":"bun run test & bun run build & release-it"},"description":"A comprehensive URL manipulation library, offering easy subdomain, path, host adjustments, and search parameters merging.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/anymud/uri.git"},"private":false,"sideEffects":false,"exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","type":"module","dependencies":{},"devDependencies":{"@anymud/bun-plugin-dts":"^1.0.2","@anymud/utils":"^0.0.2","@types/bun":"latest","release-it":"^17.1.1","typedoc":"^0.25.9"},"peerDependencies":{"typescript":"^5.0.0"},"keywords":["URI","Uniform Resource Identifier","URL","Parsing","Resolution","JavaScript","Library","Package","npm","yarn","ES modules","Module","Lightweight","Efficient","Utility","Syntax","Usage","Examples","API","Functions","Components","String","Parsing","Resolving","JavaScript","TypeScript","Open Source","MIT License"],"_id":"@anymud/url@0.2.4","gitHead":"92d03fae73873a28d295f17a24ef26ff4a3811e8","bugs":{"url":"https://github.com/anymud/uri/issues"},"homepage":"https://github.com/anymud/uri#readme","_nodeVersion":"21.6.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-VdCTqcP0dfHdhfG8t1Q/VyJSC02xfQFKVr+5GBiw9oOtHaJvAmiv6/6kkrS3NVtmSB0WPpPK4scebPXmpdoDTg==","shasum":"765f73602f44d42c35983a8b3fc42c17925ac569","tarball":"https://registry.npmjs.org/@anymud/url/-/url-0.2.4.tgz","fileCount":4,"unpackedSize":11243,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBPjJNX05NcQE9fM27JUebe4w1viDHgANKuiRZ1r9zlEAiBlkegFI8mYxiRFa87aXvv99QENYI1LCIP0K3t6w3NMxg=="}]},"_npmUser":{"name":"shtse8","email":"shtse8@gmail.com"},"directories":{},"maintainers":[{"name":"shtse8","email":"shtse8@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/url_0.2.4_1708976900602_0.9987031035090614"},"_hasShrinkwrap":false},"0.2.5":{"name":"@anymud/url","author":{"name":"Kyle Tse","email":"shtse8@gmail.com"},"version":"0.2.5","scripts":{"test":"bun test","build":"bun build.ts","release":"bun run test & bun run build & release-it"},"description":"A comprehensive URL manipulation library, offering easy subdomain, path, host adjustments, and search parameters merging.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/anymud/uri.git"},"private":false,"sideEffects":false,"exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","type":"module","dependencies":{},"devDependencies":{"@anymud/bun-plugin-dts":"^1.0.2","@anymud/utils":"^0.0.2","@types/bun":"latest","release-it":"^17.1.1","typedoc":"^0.25.9"},"peerDependencies":{"typescript":"^5.0.0"},"keywords":["URI","Uniform Resource Identifier","URL","Parsing","Resolution","JavaScript","Library","Package","npm","yarn","ES modules","Module","Lightweight","Efficient","Utility","Syntax","Usage","Examples","API","Functions","Components","String","Parsing","Resolving","JavaScript","TypeScript","Open Source","MIT License"],"_id":"@anymud/url@0.2.5","gitHead":"0cbaffbe1ad08095b7e1ffded5474098ca94298f","bugs":{"url":"https://github.com/anymud/uri/issues"},"homepage":"https://github.com/anymud/uri#readme","_nodeVersion":"21.6.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-BdCktA3HolTgCZxK+jl4OCo/MyGsIxHh9ZWU9IujWyNUG+IhBAPb82F4dwLkq4H5c+DpVLHwDEI7bkT4GcRi9w==","shasum":"20953d28e6227a0e85d2aa8a53e54ce5ba6828ae","tarball":"https://registry.npmjs.org/@anymud/url/-/url-0.2.5.tgz","fileCount":4,"unpackedSize":11755,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFd8H4GDW9JnWaWnFOeekuJCw4p5+r0iI4oHrnURJIZiAiBjc+9ojufwrn2orbltk9mvqsaE8vvaE/qXih3BrbfQTQ=="}]},"_npmUser":{"name":"shtse8","email":"shtse8@gmail.com"},"directories":{},"maintainers":[{"name":"shtse8","email":"shtse8@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/url_0.2.5_1709032437942_0.23391640410433778"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-26T19:04:24.642Z","0.1.4":"2024-02-26T19:04:24.927Z","modified":"2024-02-27T11:13:58.569Z","0.2.0":"2024-02-26T19:30:24.936Z","0.2.1":"2024-02-26T19:33:01.378Z","0.2.2":"2024-02-26T19:35:02.757Z","0.2.3":"2024-02-26T19:42:25.390Z","0.2.4":"2024-02-26T19:48:20.773Z","0.2.5":"2024-02-27T11:13:58.116Z"},"maintainers":[{"name":"shtse8","email":"shtse8@gmail.com"}],"description":"A comprehensive URL manipulation library, offering easy subdomain, path, host adjustments, and search parameters merging.","homepage":"https://github.com/anymud/uri#readme","keywords":["URI","Uniform Resource Identifier","URL","Parsing","Resolution","JavaScript","Library","Package","npm","yarn","ES modules","Module","Lightweight","Efficient","Utility","Syntax","Usage","Examples","API","Functions","Components","String","Parsing","Resolving","JavaScript","TypeScript","Open Source","MIT License"],"repository":{"type":"git","url":"git+https://github.com/anymud/uri.git"},"author":{"name":"Kyle Tse","email":"shtse8@gmail.com"},"bugs":{"url":"https://github.com/anymud/uri/issues"},"license":"MIT","readme":"# @anymud/url\n\n`@anymud/url` is a comprehensive library designed for URL manipulation, enabling easy adjustments to subdomains, paths, and hosts, as well as merging URL search parameters with support for replace and append modes. Optimized for modern web development, it supports ESM modules and is compatible with `npm`, `pnpm`, `yarn`, and `bun`, providing a versatile toolset for developers.\n\n## Key Features\n\n- **Dynamic URL Conversion**: Convert various inputs into a URL object, supporting relative URL resolution against a base.\n- **Subdomain Manipulation**: Get, set, or replace subdomains with ease, including support for complex TLDs.\n- **Path and Host Adjustments**: Directly modify paths and hosts within URLs.\n- **Search Parameters Management**: Advanced capabilities for converting to and merging URLSearchParams, with flexible strategies.\n\n## Installation\n\n`@anymud/url` supports installation using `npm`, `pnpm`, `yarn`, or `bun`. It exclusively supports ESM modules. Choose your preferred package manager for installation:\n\n```bash\nnpm install @anymud/url\n```\n\n```bash\npnpm add @anymud/url\n```\n\n```bash\nyarn add @anymud/url\n```\n\n```bash\nbun add @anymud/url\n```\n\n## Usage Examples\n\n### Converting Input to URL\n\n```javascript\nimport { toURL } from '@anymud/url';\n\nconst url = toURL('/path', 'https://example.com');\nconsole.log(url.href); // Outputs: \"https://example.com/path\"\n```\n\n### Setting Subdomains\n\n```javascript\nimport { setSubdomain } from '@anymud/url';\n\nconst newUrl = setSubdomain('https://example.com', 'blog');\nconsole.log(newUrl.href); // Outputs: \"https://blog.example.com\"\n```\n\n### Merging URL Search Parameters\n\n```javascript\nimport { mergeURLSearchParams } from '@anymud/url';\n\nconst mergedParams = mergeURLSearchParams('a=1&b=2', 'b=3&c=4', 'append');\nconsole.log(mergedParams.toString()); // Outputs: \"a=1&b=2&b=3&c=4\"\n```\n\n## Contributing\n\nWe welcome contributions to `@anymud/url`. Whether it's submitting issues, pull requests, or suggestions, your help and feedback are invaluable in improving this library.\n\n## License\n\n`@anymud/url` is licensed under the MIT License.","readmeFilename":"README.md"}