{"id":26711624,"url":"https://github.com/stackblogger/link-exists","last_synced_at":"2026-04-15T05:01:15.687Z","repository":{"id":163620454,"uuid":"637444407","full_name":"stackblogger/link-exists","owner":"stackblogger","description":"A super lightweight JavaScript / TypeScript library to check whether a given url is valid and exists or not.","archived":false,"fork":false,"pushed_at":"2026-04-15T00:44:08.000Z","size":113,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-15T02:33:17.006Z","etag":null,"topics":["exists","is-link-valid","is-url-valid","javascript","link","link-exists","link-validator","nodejs","typescript","url","url-exist","url-validator"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/link-exists","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stackblogger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-07T15:19:38.000Z","updated_at":"2026-04-15T00:44:12.000Z","dependencies_parsed_at":"2023-07-06T14:00:19.278Z","dependency_job_id":null,"html_url":"https://github.com/stackblogger/link-exists","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stackblogger/link-exists","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackblogger%2Flink-exists","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackblogger%2Flink-exists/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackblogger%2Flink-exists/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackblogger%2Flink-exists/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackblogger","download_url":"https://codeload.github.com/stackblogger/link-exists/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackblogger%2Flink-exists/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31826902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"online","status_checked_at":"2026-04-15T02:00:06.175Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["exists","is-link-valid","is-url-valid","javascript","link","link-exists","link-validator","nodejs","typescript","url","url-exist","url-validator"],"created_at":"2025-03-27T10:29:49.479Z","updated_at":"2026-04-15T05:01:15.679Z","avatar_url":"https://github.com/stackblogger.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![npm](https://img.shields.io/npm/v/link-exists?style=flat-square\u0026color=success\u0026logo=npm)\n![npm](https://img.shields.io/npm/dm/link-exists?style=flat-square\u0026color=success\u0026logo=npm)\n![GitHub](https://img.shields.io/github/license/stackblogger/link-exists?style=flat-square\u0026logo=github\u0026color=success)\n\n# link-exists\n\nA super lightweight JavaScript / TypeScript library to check whether a given url is valid and exists or not.\n\n## Installation\n\n```bash\nnpm install link-exists\n```\n\n## Features\n\nA super lightweight library to validate if a given url is valid or not. Some additional features are-\n\n- less than \u003cb\u003e1 kb\u003c/b\u003e in size\n- additional configuration to validate as per custom requirement\n- supports node.js latest version\n- TypeScript and JavaScript support\n- built on ES6 modules\n- Jest test cases with \u003cb\u003e100% coverage\u003c/b\u003e\n- Promise based result\n\n## Usage\n\n**[Full documentation](https://opensource.stackblogger.com/link-exists/)** — API, config options, behavior notes, and more examples.\n\n### TypeScript\n\n```typescript\nimport { linkExists } from 'link-exists';\n\nawait linkExists('https://stackblogger.com'); // true when any HTTP answer comes back\n// response: true\n\nawait linkExists('www.stackblogger.com'); // false: no protocol in the string by default\n// response: false\n\nawait linkExists('www.stackblogger.com', { ignoreProtocol: true }); // same host, protocol added\n// response: true\n\nawait linkExists('https://example.com', { details: true }); // object, exists follows ok status\n// response: { exists: true, status: 200, url: 'https://example.com/' }\n\nawait linkExists('stackblogger.com', { ignoreProtocol: true }); // allow link with no protocol\n// response: true\n\nawait linkExists('https://example.com', { timeout: 5000 }); // stop after 5 seconds\n// response: true (or false on timeout / error)\n\nawait linkExists('https://example.com', { method: 'GET' }); // use GET not HEAD\n// response: true\n\nawait linkExists('https://example.com', { fallbackToGet: false }); // no GET retry after HEAD\n// response: true\n\nawait linkExists('https://example.com', { details: true, timeout: 8000, method: 'HEAD' }); // mix of options\n// response: { exists: true, status: 200, url: 'https://example.com/' }\n```\n\n### JavaScript\n\n```javascript\nconst { linkExists } = require('link-exists');\n\nawait linkExists('https://stackblogger.com'); // true when any HTTP answer comes back\n// response: true\n\nawait linkExists('www.stackblogger.com'); // false: no protocol in the string by default\n// response: false\n\nawait linkExists('www.stackblogger.com', { ignoreProtocol: true }); // same host, protocol added\n// response: true\n\nawait linkExists('https://example.com', { details: true }); // object, exists follows ok status\n// response: { exists: true, status: 200, url: 'https://example.com/' }\n\nawait linkExists('stackblogger.com', { ignoreProtocol: true }); // allow link with no protocol\n// response: true\n\nawait linkExists('https://example.com', { timeout: 5000 }); // stop after 5 seconds\n// response: true (or false on timeout / error)\n\nawait linkExists('https://example.com', { method: 'GET' }); // use GET not HEAD\n// response: true\n\nawait linkExists('https://example.com', { fallbackToGet: false }); // no GET retry after HEAD\n// response: true\n\nawait linkExists('https://example.com', { details: true, timeout: 8000, method: 'HEAD' }); // mix of options\n// response: { exists: true, status: 200, url: 'https://example.com/' }\n```\n\n### License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackblogger%2Flink-exists","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackblogger%2Flink-exists","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackblogger%2Flink-exists/lists"}