{"name":"is-absolute-url","version":"5.0.0","description":"Check if a URL is absolute","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-absolute-url.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"test":"xo && ava"},"keywords":["url","absolute","relative","is","check"],"devDependencies":{"ava":"^6.4.1","xo":"^1.2.2"},"_id":"is-absolute-url@5.0.0","gitHead":"76c6aff8bd56c55977f37ec71a5d9562bd55ea64","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/is-absolute-url/issues"},"homepage":"https://github.com/sindresorhus/is-absolute-url#readme","_nodeVersion":"20.19.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-sdJyNpBnQHuVnBunfzjAecOhZr2+A30ywfFvu3EnxtKLUWfwGgyWUmqHbGZiU6vTfHpCPm5GvLe4BAvlU9n8VQ==","shasum":"284b172dc39b4697f0e7f8f58bda4e84c01eb206","tarball":"http://registry-npm.ywwl.com/is-absolute-url/download/is-absolute-url-5.0.0.tgz","fileCount":5,"unpackedSize":4844,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCxzdfVsGgvV1ptjxr/rbpq10yw3w+3rOG2gVlZSUtXVwIgQOWu/XddzoVul9J7THEbHyKi8qS2+YNPnSMovS3DNbE="}],"size":2212,"noattachment":false,"key":"/is-absolute-url/-/is-absolute-url-5.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/is-absolute-url_5.0.0_1757750599403_0.5799180068901912"},"_hasShrinkwrap":false,"readme":"# is-absolute-url\n\n> Check if a URL is absolute\n\n## Install\n\n```sh\nnpm install is-absolute-url\n```\n\n## Usage\n\n```js\nimport isAbsoluteUrl from 'is-absolute-url';\n\nisAbsoluteUrl('https://sindresorhus.com/foo/bar');\n//=> true\n\nisAbsoluteUrl('//sindresorhus.com');\n//=> false\n\nisAbsoluteUrl('foo/bar');\n//=> false\n\nisAbsoluteUrl('javascript:alert(1)');\n//=> false\n\nisAbsoluteUrl('javascript:alert(1)', {httpOnly: false});\n//=> true\n```\n\n## API\n\n### isAbsoluteUrl(url, options?)\n\n#### url\n\nType: `string`\n\nThe URL to check.\n\n#### options\n\nType: `object`\n\n##### httpOnly\n\nType: `boolean`\\\nDefault: `true`\n\nOnly allow HTTP(S) protocols.\n\nWhen set to `false`, any valid absolute URL will be accepted, including potentially unsafe protocols like `javascript:`, `ftp:`, `ws:`, etc.\n\n> **Warning**: Setting `httpOnly` to `false` can pose security risks as it will return `true` for URLs with protocols like `javascript:`, `vbscript:`, `data:`, `ftp:`, `ws:`, etc. Only set this to `false` if you understand the implications and have appropriate safeguards in place.\n\n## Related\n\nSee [is-relative-url](https://github.com/sindresorhus/is-relative-url) for the inverse.\n","publish_time":1757750599588,"_cnpm_publish_time":1757750599588,"dist-tags":{"latest":"5.0.0"}}